diff --git a/question/type/questiontype.php b/question/type/questiontype.php index da40a84e357..2035657b588 100644 --- a/question/type/questiontype.php +++ b/question/type/questiontype.php @@ -1039,16 +1039,12 @@ class default_questiontype { allowed. */ if (($cmoptions->optionflags & QUESTION_ADAPTIVE) and !$options->readonly) { - echo '<input type="submit" name="'; - echo $question->name_prefix; - echo 'submit" value="'; - print_string('mark', 'quiz'); - echo '" class="submit btn"'; - echo ' />'; + echo '<input type="submit" name="', $question->name_prefix, 'submit" value="', + get_string('mark', 'quiz'), '" class="submit btn" onclick="', + "form.action = form.action + '#q", $question->id, "'; return true;", '" />'; } } - /** * Return a summary of the student response *