MDL-58796 mod_quiz: add handling for fontawesome icons
authorSimey Lameze <simey@moodle.com>
Wed, 3 May 2017 08:50:49 +0000 (16:50 +0800)
committerSimey Lameze <simey@moodle.com>
Thu, 4 May 2017 05:51:14 +0000 (13:51 +0800)
mod/quiz/yui/build/moodle-mod_quiz-util-slot/moodle-mod_quiz-util-slot-debug.js
mod/quiz/yui/build/moodle-mod_quiz-util-slot/moodle-mod_quiz-util-slot-min.js
mod/quiz/yui/build/moodle-mod_quiz-util-slot/moodle-mod_quiz-util-slot.js
mod/quiz/yui/src/util/js/slot.js

index a450f15..5653cef 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-util-slot/moodle-mod_quiz-util-slot-debug.js and b/mod/quiz/yui/build/moodle-mod_quiz-util-slot/moodle-mod_quiz-util-slot-debug.js differ
index 3881b84..adbe179 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-util-slot/moodle-mod_quiz-util-slot-min.js and b/mod/quiz/yui/build/moodle-mod_quiz-util-slot/moodle-mod_quiz-util-slot-min.js differ
index a450f15..5653cef 100644 (file)
Binary files a/mod/quiz/yui/build/moodle-mod_quiz-util-slot/moodle-mod_quiz-util-slot.js and b/mod/quiz/yui/build/moodle-mod_quiz-util-slot/moodle-mod_quiz-util-slot.js differ
index 9588adc..8ef4a04 100644 (file)
@@ -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);
+                    }
+                );
+            });
         }
     }
 };