Skip to content

Commit

Permalink
Merge branch 'mdl-56831-master' of https://github.com/Dagefoerde/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Nov 14, 2016
2 parents 55e5495 + c2e1233 commit 585ba84
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion mod/quiz/amd/build/preflightcheck.min.js

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

18 changes: 10 additions & 8 deletions mod/quiz/amd/src/preflightcheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
});
});
}
};
Expand Down

0 comments on commit 585ba84

Please sign in to comment.