when teachers split a quiz to several pages... some times, the pupils
get confused and press the submit button on the bottom of the page
instead of pressing the Next link for the quiz' next page.
so, i made a little hack to have the Submit button appears only on the
last page in the sequence.
open moodle/mod/quiz/attempt.php and wrap the following lines (around line 506)
echo "<div class=\"submitbtns mdl-align\">\n";
echo "<input type=\"submit\" name=\"saveattempt\" value=\"".get_string("savenosubmit", "quiz")."\" />\n";
if ($quiz->optionflags & QUESTION_ADAPTIVE)
echo "<input type=\"submit\" name=\"finishattempt\" value=\"".get_string("finishattempt", "quiz")."\" onclick=\"$onclick\" />\n";
echo "</div>";
like this:
if ($numpages == $page+1) { // show submit button on last page only
echo "<div class=\"submitbtns mdl-align\">\n";
echo "<input type=\"submit\" name=\"saveattempt\" value=\"".get_string("savenosubmit", "quiz")."\" />\n";
if ($quiz->optionflags & QUESTION_ADAPTIVE) { echo "<input type="submit" name="markall" value="".get_string("markall", "quiz")."" />n"; }
echo "<input type=\"submit\" name=\"finishattempt\" value=\"".get_string("finishattempt", "quiz")."\" onclick=\"$onclick\" />\n";
echo "</div>";
}
i guess, we can add a global $CFG to control this behavior
or even a local new setting in each quiz module (DB table)
if others will like this feature too.
enjoy