Clean up code in a couple of places by using my print_js_call function.
This commit is contained in:
@@ -860,9 +860,8 @@ abstract class quiz_nav_panel_base {
|
||||
}
|
||||
|
||||
protected function get_button_update_script($question) {
|
||||
return '<script type="text/javascript">' .
|
||||
"\nquiz_init_nav_button('" . $this->get_button_id($question) . "', " .
|
||||
$question->id . ")\n</script>\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);
|
||||
|
||||
@@ -986,9 +986,8 @@ class default_questiontype {
|
||||
$flagcontent = '<input type="checkbox" id="' . $id . '" name="' . $id .
|
||||
'" value="1" ' . $checked . ' />' .
|
||||
'<label id="' . $id . 'label" for="' . $id . '">' . $this->get_question_flag_tag(
|
||||
$state->flagged, $id . 'img') . '</label>' .
|
||||
"\n" . '<script type="text/javascript">question_flag_changer.init_flag(' .
|
||||
"'$id', '$postdata');</script>";
|
||||
$state->flagged, $id . 'img') . '</label>' . "\n" .
|
||||
print_js_call('question_flag_changer.init_flag', array($id, $postdata), true);
|
||||
break;
|
||||
default:
|
||||
$flagcontent = '';
|
||||
|
||||
Reference in New Issue
Block a user