X7ROOT File Manager
Current Path:
/home/cbholdings/pasukulu/mod/quiz/amd/build
home
/
cbholdings
/
pasukulu
/
mod
/
quiz
/
amd
/
build
/
📁
..
📄
add_question_modal_launcher.min.js
(1.04 KB)
📄
add_question_modal_launcher.min.js.map
(4.11 KB)
📄
add_random_form.min.js
(2.19 KB)
📄
add_random_form.min.js.map
(9.46 KB)
📄
add_random_question.min.js
(844 B)
📄
add_random_question.min.js.map
(2.78 KB)
📄
modal_add_random_question.min.js
(4.48 KB)
📄
modal_add_random_question.min.js.map
(13.51 KB)
📄
modal_quiz_question_bank.min.js
(3.86 KB)
📄
modal_quiz_question_bank.min.js.map
(13.76 KB)
📄
preflightcheck.min.js
(1.7 KB)
📄
preflightcheck.min.js.map
(5.81 KB)
📄
question_slot.min.js
(1.08 KB)
📄
question_slot.min.js.map
(2.93 KB)
📄
quizquestionbank.min.js
(589 B)
📄
quizquestionbank.min.js.map
(1.83 KB)
📄
random_question_form_preview.min.js
(2.87 KB)
📄
random_question_form_preview.min.js.map
(11.26 KB)
📄
reopen_attempt_ui.min.js
(1.66 KB)
📄
reopen_attempt_ui.min.js.map
(3.81 KB)
📄
repaginate.min.js
(655 B)
📄
repaginate.min.js.map
(1.97 KB)
📄
submission_confirmation.min.js
(1.8 KB)
📄
submission_confirmation.min.js.map
(3.67 KB)
Editing: submission_confirmation.min.js.map
{"version":3,"file":"submission_confirmation.min.js","sources":["../src/submission_confirmation.js"],"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 * A javascript module to handle submission confirmation for quiz.\n *\n * @module mod_quiz/submission_confirmation\n * @copyright 2022 Huong Nguyen <huongnv13@gmail.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 4.1\n */\n\nimport {saveCancelPromise} from 'core/notification';\nimport Prefetch from 'core/prefetch';\nimport Templates from 'core/templates';\nimport {get_string as getString} from 'core/str';\n\nconst SELECTOR = {\n attemptSubmitButton: '.path-mod-quiz .btn-finishattempt button',\n attemptSubmitForm: 'form#frm-finishattempt',\n};\n\nconst TEMPLATES = {\n submissionConfirmation: 'mod_quiz/submission_confirmation',\n};\n\n/**\n * Register events for attempt submit button.\n * @param {int} unAnsweredQuestions Total number of un-answered questions\n */\nconst registerEventListeners = (unAnsweredQuestions) => {\n const submitAction = document.querySelector(SELECTOR.attemptSubmitButton);\n if (submitAction) {\n submitAction.addEventListener('click', async(e) => {\n e.preventDefault();\n try {\n await saveCancelPromise(\n getString('submission_confirmation', 'quiz'),\n Templates.render(TEMPLATES.submissionConfirmation, {\n hasunanswered: unAnsweredQuestions > 0,\n totalunanswered: unAnsweredQuestions\n }),\n getString('submitallandfinish', 'quiz')\n );\n\n // Save pressed.\n submitAction.closest(SELECTOR.attemptSubmitForm).submit();\n } catch {\n // Cancel pressed.\n return;\n }\n });\n }\n};\n\n/**\n * Initialises.\n * @param {int} unAnsweredQuestions Total number of unanswered questions\n */\nexport const init = (unAnsweredQuestions) => {\n Prefetch.prefetchStrings('core', ['submit']);\n Prefetch.prefetchStrings('core_admin', ['confirmation']);\n Prefetch.prefetchStrings('quiz', ['submitallandfinish', 'submission_confirmation']);\n Prefetch.prefetchTemplate(TEMPLATES.submissionConfirmation);\n registerEventListeners(unAnsweredQuestions);\n};\n"],"names":["SELECTOR","TEMPLATES","unAnsweredQuestions","prefetchStrings","prefetchTemplate","submitAction","document","querySelector","addEventListener","async","e","preventDefault","Templates","render","hasunanswered","totalunanswered","closest","submit","registerEventListeners"],"mappings":";;;;;;;;kLA6BMA,6BACmB,2CADnBA,2BAEiB,yBAGjBC,iCACsB,iDAoCPC,wCACRC,gBAAgB,OAAQ,CAAC,6BACzBA,gBAAgB,aAAc,CAAC,mCAC/BA,gBAAgB,OAAQ,CAAC,qBAAsB,8CAC/CC,iBAAiBH,kCAjCEC,CAAAA,4BACtBG,aAAeC,SAASC,cAAcP,8BACxCK,cACAA,aAAaG,iBAAiB,SAASC,MAAAA,IACnCC,EAAEC,2BAEQ,oCACF,mBAAU,0BAA2B,QACrCC,mBAAUC,OAAOZ,iCAAkC,CAC/Ca,cAAeZ,oBAAsB,EACrCa,gBAAiBb,uBAErB,mBAAU,qBAAsB,SAIpCG,aAAaW,QAAQhB,4BAA4BiB,SACnD,kBAiBVC,CAAuBhB"}
Upload File
Create Folder