From 6c772bcbf2f66fe101ddfb09ce5f7fad9b38aca5 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Tue, 26 Jan 2010 09:36:00 +0000 Subject: [PATCH] MDL-21403 hardcoded JS legacy code should not use new $PAGE->requires-> api, switching to html_writer instead --- mod/quiz/accessrules.php | 4 ++-- mod/quiz/report/grading/report.php | 4 ++-- mod/scorm/player.php | 6 +++--- question/type/multianswer/questiontype.php | 5 +++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/mod/quiz/accessrules.php b/mod/quiz/accessrules.php index 2e8e408d6bd..ea089d0cbff 100644 --- a/mod/quiz/accessrules.php +++ b/mod/quiz/accessrules.php @@ -727,8 +727,8 @@ class securewindow_access_rule extends quiz_access_rule_base { echo "window.open('$attempturl', '$window', '$this->windowoptions');", '" />'; /// JavaScript to reveal the button. - echo $PAGE->requires->js('/mod/quiz/quiz.js')->asap(); - echo $PAGE->requires->js_function_call('reveal_start_button')->asap(); + echo html_writer::script('', $CFG->wwwroot.'/mod/quiz/quiz.js'); + echo html_writer::script(js_writer::function_call('reveal_start_button')); /// A noscript tag to explains that this quiz only works with JavaScript enabled. echo '