░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/var/www/moodle/public/mod/quiz/yui/src/modform/js
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: modform.js
/** * The modform class has all the JavaScript specific to mod/quiz/mod_form.php. * * @module moodle-mod_quiz-modform */ var MODFORM = function() { MODFORM.superclass.constructor.apply(this, arguments); }; /** * The coursebase class to provide shared functionality to Modules within * Moodle. * * @class M.course.coursebase * @constructor */ Y.extend(MODFORM, Y.Base, { repaginateCheckbox: null, qppSelect: null, qppInitialValue: 0, initializer: function() { this.repaginateCheckbox = Y.one('#id_repaginatenow'); if (!this.repaginateCheckbox) { // The checkbox only appears when editing an existing quiz. return; } this.qppSelect = Y.one('#id_questionsperpage'); this.qppInitialValue = this.qppSelect.get('value'); this.qppSelect.on('change', this.qppChanged, this); }, qppChanged: function() { Y.later(50, this, function() { if (!this.repaginateCheckbox.get('disabled')) { this.repaginateCheckbox.set('checked', this.qppSelect.get('value') !== this.qppInitialValue); } }); } }); // Ensure that M.mod_quiz exists and that coursebase is initialised correctly M.mod_quiz = M.mod_quiz || {}; M.mod_quiz.modform = M.mod_quiz.modform || new MODFORM(); M.mod_quiz.modform.init = function() { return new MODFORM(); };
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 modform.js
JS
1.4 KB
2026-02-11 01:44
EDIT