MDL-77419 Quiz: question/qengine.js tidy-up

This commit is contained in:
danghieu1407
2023-03-14 10:26:46 +07:00
parent 556208417d
commit b875ecdcc4
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -447,6 +447,10 @@ class page_requirements_manager {
* @param bool $inhead initialise in head
*/
public function js($url, $inhead = false) {
if ($url == '/question/qengine.js') {
debugging('The question/qengine.js has been deprecated. ' .
'Please use core_question/question_engine', DEBUG_DEVELOPER);
}
$url = $this->js_fix_url($url);
$where = $inhead ? 'head' : 'footer';
$this->jsincludes[$where][$url->out()] = $url;
+1 -1
View File
@@ -201,7 +201,7 @@ for ($pageiter = 1; $pageiter <= $numberoflisteners; $pageiter++) {
}
$PAGE->requires->data_for_js('quiz_edit_config', $quizeditconfig);
$PAGE->requires->js('/question/qengine.js');
$PAGE->requires->js_call_amd('core_question/question_engine');
// Questions wrapper start.
echo html_writer::start_tag('div', ['class' => 'mod-quiz-edit-content']);