MDL-56831 quiz: Declare YUI dependencies explicitly where needed
authorJan Dageförde <jan.dagefoerde@ercis.uni-muenster.de>
Tue, 8 Nov 2016 09:26:08 +0000 (10:26 +0100)
committerJan Dageförde <jan.dagefoerde@ercis.uni-muenster.de>
Sun, 13 Nov 2016 22:07:00 +0000 (23:07 +0100)
mod/quiz/amd/build/preflightcheck.min.js
mod/quiz/amd/src/preflightcheck.js

index 48befcf..e05bbf6 100644 (file)
Binary files a/mod/quiz/amd/build/preflightcheck.min.js and b/mod/quiz/amd/build/preflightcheck.min.js differ
index f55e130..2558520 100644 (file)
@@ -45,7 +45,7 @@ define(['jquery', 'core/yui'], function($, Y) {
         init: function(startButton, confirmationTitle, confirmationForm, popupoptions) {
             var finalStartButton = startButton;
 
-            Y.use('moodle-core-notification', 'moodle-core-formchangechecker', 'io-form', function() {
+            Y.use('moodle-core-notification', function() {
                 if (Y.one(confirmationForm)) {
                     t.confirmDialogue = new M.core.dialogue({
                         headerContent: confirmationTitle,
@@ -99,13 +99,15 @@ define(['jquery', 'core/yui'], function($, Y) {
          */
         launchQuizPopup: function(e, popupoptions) {
             e.halt();
-            M.core_formchangechecker.reset_form_dirty_state();
-            var form = e.target.ancestor('form');
-            window.openpopup(e, {
-                url: form.get('action') + '?' + Y.IO.stringify(form).replace(/\bcancel=/, 'x='),
-                windowname: 'quizpopup',
-                options: popupoptions,
-                fullscreen: true,
+            Y.use('moodle-core-formchangechecker', 'io-form', function() {
+                M.core_formchangechecker.reset_form_dirty_state();
+                var form = e.target.ancestor('form');
+                window.openpopup(e, {
+                    url: form.get('action') + '?' + Y.IO.stringify(form).replace(/\bcancel=/, 'x='),
+                    windowname: 'quizpopup',
+                    options: popupoptions,
+                    fullscreen: true,
+                });
             });
         }
     };