Current Path : C:/xampp/htdocs/moodle/mod/quiz/amd/build/ |
Current File : C:/xampp/htdocs/moodle/mod/quiz/amd/build/preflightcheck.min.js.map |
{"version":3,"sources":["../src/preflightcheck.js"],"names":["define","$","Y","t","confirmDialogue","init","startButton","confirmationTitle","confirmationForm","popupoptions","finalStartButton","use","one","M","core","dialogue","headerContent","bodyContent","draggable","visible","center","modal","width","extraClasses","on","displayDialogue","hideDialogue","get","launchQuizPopup","e","halt","show","hide","core_formchangechecker","reset_form_dirty_state","form","target","ancestor","window","openpopup","url","IO","stringify","replace","windowname","options","fullscreen"],"mappings":"AA4BAA,OAAM,2BAAC,CAAC,QAAD,CAAW,UAAX,CAAD,CAAyB,SAASC,CAAT,CAAYC,CAAZ,CAAe,CAK1C,GAAIC,CAAAA,CAAC,CAAG,CACJC,eAAe,CAAE,IADb,CAWJC,IAAI,CAAE,cAASC,CAAT,CAAsBC,CAAtB,CAAyCC,CAAzC,CAA2DC,CAA3D,CAAyE,CAC3E,GAAIC,CAAAA,CAAgB,CAAGJ,CAAvB,CAEAJ,CAAC,CAACS,GAAF,CAAM,0BAAN,CAAkC,UAAW,CACzC,GAAIT,CAAC,CAACU,GAAF,CAAMJ,CAAN,CAAJ,CAA6B,CACzBL,CAAC,CAACC,eAAF,CAAoB,GAAIS,CAAAA,CAAC,CAACC,IAAF,CAAOC,QAAX,CAAoB,CACpCC,aAAa,CAAET,CADqB,CAEpCU,WAAW,CAAEf,CAAC,CAACU,GAAF,CAAMJ,CAAN,CAFuB,CAGpCU,SAAS,GAH2B,CAIpCC,OAAO,GAJ6B,CAKpCC,MAAM,GAL8B,CAMpCC,KAAK,GAN+B,CAOpCC,KAAK,CAAE,IAP6B,CAQpCC,YAAY,CAAE,CAAC,0BAAD,CARsB,CAApB,CAApB,CAWArB,CAAC,CAACU,GAAF,CAAMN,CAAN,EAAmBkB,EAAnB,CAAsB,OAAtB,CAA+BrB,CAAC,CAACsB,eAAjC,EACAvB,CAAC,CAACU,GAAF,CAAM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qC,UAAU,GAJM,CAApB,CAMH,CATD,CAUH,CA9EG,CAAR,CAiFA,MAAO3C,CAAAA,CACV,CAvFK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * This class manages the confirmation pop-up (also called the pre-flight check)\n * that is sometimes shown when a use clicks the start attempt button.\n *\n * This is also responsible for opening the pop-up window, if the quiz requires to be in one.\n *\n * @module mod_quiz/preflightcheck\n * @class preflightcheck\n * @package mod_quiz\n * @copyright 2016 The Open University\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 3.1\n */\ndefine(['jquery', 'core/yui'], function($, Y) {\n\n /**\n * @alias module:mod_quiz/preflightcheck\n */\n var t = {\n confirmDialogue: null,\n\n /**\n * Initialise the start attempt button.\n *\n * @param {String} startButton the id of the start attempt button that we will be enhancing.\n * @param {String} confirmationTitle the title of the dialogue.\n * @param {String} confirmationForm selector for the confirmation form to show in the dialogue.\n * @param {String} popupoptions If not null, the quiz should be launced in a pop-up.\n */\n init: function(startButton, confirmationTitle, confirmationForm, popupoptions) {\n var finalStartButton = startButton;\n\n Y.use('moodle-core-notification', function() {\n if (Y.one(confirmationForm)) {\n t.confirmDialogue = new M.core.dialogue({\n headerContent: confirmationTitle,\n bodyContent: Y.one(confirmationForm),\n draggable: true,\n visible: false,\n center: true,\n modal: true,\n width: null,\n extraClasses: ['mod_quiz_preflight_popup']\n });\n\n Y.one(startButton).on('click', t.displayDialogue);\n Y.one('#id_cancel').on('click', t.hideDialogue);\n\n finalStartButton = t.confirmDialogue.get('boundingBox').one('[name=\"submitbutton\"]');\n }\n\n if (popupoptions) {\n Y.one(finalStartButton).on('click', t.launchQuizPopup, t, popupoptions);\n }\n });\n },\n\n /**\n * Display the dialogue.\n * @param {Y.EventFacade} e the event being responded to, if any.\n */\n displayDialogue: function(e) {\n if (e) {\n e.halt();\n }\n t.confirmDialogue.show();\n },\n\n /**\n * Hide the dialogue.\n * @param {Y.EventFacade} e the event being responded to, if any.\n */\n hideDialogue: function(e) {\n if (e) {\n e.halt();\n }\n t.confirmDialogue.hide(e);\n },\n\n /**\n * Event handler for the quiz start attempt button.\n * @param {Event} e the event being responded to\n * @param {Object} popupoptions\n */\n launchQuizPopup: function(e, popupoptions) {\n e.halt();\n Y.use('moodle-core-formchangechecker', 'io-form', function() {\n M.core_formchangechecker.reset_form_dirty_state();\n var form = e.target.ancestor('form');\n window.openpopup(e, {\n url: form.get('action') + '?' + Y.IO.stringify(form).replace(/\\bcancel=/, 'x='),\n windowname: 'quizpopup',\n options: popupoptions,\n fullscreen: true,\n });\n });\n }\n };\n\n return t;\n});\n"],"file":"preflightcheck.min.js"}