Skip to content

Commit

Permalink
Merge branch 'MDL-58796-master' of git://github.com/lameze/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
snake committed May 5, 2017
2 parents 609a107 + 84d4411 commit 42a123b
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,23 @@ Y.Moodle.mod_quiz.util.slot = {
if (requiresprevious) {
link.set('title', M.util.get_string('questiondependencyremove', 'quiz', a));
link.setData('action', 'removedependency');
icon.set('alt', M.util.get_string('questiondependsonprevious', 'quiz'));
icon.set('src', M.util.image_url('t/locked', 'moodle'));
window.require(['core/templates'], function(Templates) {
Templates.renderPix('t/locked', 'core', M.util.get_string('questiondependsonprevious', 'quiz')).then(
function(html) {
icon.replace(html);
}
);
});
} else {
link.set('title', M.util.get_string('questiondependencyadd', 'quiz', a));
link.setData('action', 'adddependency');
icon.set('alt', M.util.get_string('questiondependencyfree', 'quiz'));
icon.set('src', M.util.image_url('t/unlocked', 'moodle'));
window.require(['core/templates'], function(Templates) {
Templates.renderPix('t/unlocked', 'core', M.util.get_string('questiondependencyfree', 'quiz')).then(
function(html) {
icon.replace(html);
}
);
});
}
}
};
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,23 @@ Y.Moodle.mod_quiz.util.slot = {
if (requiresprevious) {
link.set('title', M.util.get_string('questiondependencyremove', 'quiz', a));
link.setData('action', 'removedependency');
icon.set('alt', M.util.get_string('questiondependsonprevious', 'quiz'));
icon.set('src', M.util.image_url('t/locked', 'moodle'));
window.require(['core/templates'], function(Templates) {
Templates.renderPix('t/locked', 'core', M.util.get_string('questiondependsonprevious', 'quiz')).then(
function(html) {
icon.replace(html);
}
);
});
} else {
link.set('title', M.util.get_string('questiondependencyadd', 'quiz', a));
link.setData('action', 'adddependency');
icon.set('alt', M.util.get_string('questiondependencyfree', 'quiz'));
icon.set('src', M.util.image_url('t/unlocked', 'moodle'));
window.require(['core/templates'], function(Templates) {
Templates.renderPix('t/unlocked', 'core', M.util.get_string('questiondependencyfree', 'quiz')).then(
function(html) {
icon.replace(html);
}
);
});
}
}
};
Expand Down
18 changes: 14 additions & 4 deletions mod/quiz/yui/src/util/js/slot.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,23 @@ Y.Moodle.mod_quiz.util.slot = {
if (requiresprevious) {
link.set('title', M.util.get_string('questiondependencyremove', 'quiz', a));
link.setData('action', 'removedependency');
icon.set('alt', M.util.get_string('questiondependsonprevious', 'quiz'));
icon.set('src', M.util.image_url('t/locked', 'moodle'));
window.require(['core/templates'], function(Templates) {
Templates.renderPix('t/locked', 'core', M.util.get_string('questiondependsonprevious', 'quiz')).then(
function(html) {
icon.replace(html);
}
);
});
} else {
link.set('title', M.util.get_string('questiondependencyadd', 'quiz', a));
link.setData('action', 'adddependency');
icon.set('alt', M.util.get_string('questiondependencyfree', 'quiz'));
icon.set('src', M.util.image_url('t/unlocked', 'moodle'));
window.require(['core/templates'], function(Templates) {
Templates.renderPix('t/unlocked', 'core', M.util.get_string('questiondependencyfree', 'quiz')).then(
function(html) {
icon.replace(html);
}
);
});
}
}
};

0 comments on commit 42a123b

Please sign in to comment.