From ddf977898c74bb0dcc96cffbaaca0da0652fb658 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 19 Sep 2008 04:53:03 +0000 Subject: [PATCH] Clean up code in a couple of places by using my print_js_call function. --- mod/quiz/attemptlib.php | 5 ++--- question/type/questiontype.php | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mod/quiz/attemptlib.php b/mod/quiz/attemptlib.php index 8c553a0fdb..9225016e05 100644 --- a/mod/quiz/attemptlib.php +++ b/mod/quiz/attemptlib.php @@ -860,9 +860,8 @@ abstract class quiz_nav_panel_base { } protected function get_button_update_script($question) { - return '\n"; + return print_js_call('quiz_init_nav_button', + array($this->get_button_id($question), $question->id), true); } abstract protected function get_question_button($number, $question); diff --git a/question/type/questiontype.php b/question/type/questiontype.php index 9610c11211..dde40b10ff 100644 --- a/question/type/questiontype.php +++ b/question/type/questiontype.php @@ -986,9 +986,8 @@ class default_questiontype { $flagcontent = '' . '' . - "\n" . '"; + $state->flagged, $id . 'img') . '' . "\n" . + print_js_call('question_flag_changer.init_flag', array($id, $postdata), true); break; default: $flagcontent = ''; -- 2.39.5