mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Don't have the Javascript dialog on submitting an attempt if the quiz
doesn't have a grade.
This commit is contained in:
parent
02f007f45d
commit
45376a51a9
@ -961,7 +961,13 @@ function quiz_print_quiz_questions($quiz, $results=NULL, $questions=NULL, $shuff
|
||||
|
||||
$strconfirmattempt = addslashes(get_string("readytosend", "quiz"));
|
||||
|
||||
echo "<FORM METHOD=POST ACTION=attempt.php onsubmit=\"return confirm('$strconfirmattempt');\">";
|
||||
if (empty($quiz->grade)) {
|
||||
$onsubmit = "";
|
||||
} else {
|
||||
$onsubmit = "onsubmit=\"return confirm('$strconfirmattempt');\"";
|
||||
}
|
||||
|
||||
echo "<FORM METHOD=POST ACTION=attempt.php $onsubmit>";
|
||||
echo "<INPUT TYPE=hidden NAME=q VALUE=\"$quiz->id\">";
|
||||
|
||||
$count = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user