From: moodler Date: Mon, 9 Dec 2002 08:20:19 +0000 (+0000) Subject: Add a javascript confirmation when submitting a quiz attempt X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9307692fdfd9c41d8ff1799df7c87e2d8c1c8475;p=moodle.git Add a javascript confirmation when submitting a quiz attempt --- diff --git a/lang/en/quiz.php b/lang/en/quiz.php index ba4753a0a5..220250fa10 100644 --- a/lang/en/quiz.php +++ b/lang/en/quiz.php @@ -77,6 +77,7 @@ $string['quizclosed'] = "This quiz closed on \$a"; $string['quizopen'] = "Open the quiz"; $string['quiznotavailable'] = "The quiz will not be available until: \$a"; $string['random'] = "Random set"; +$string['readytosend'] = "You are about to send your whole quiz to be graded. Are you sure you want to continue?"; $string['regrade'] = "Regrade all attempts"; $string['regradecomplete'] = "All attempts have been regraded"; $string['regradecount'] = "\$a->changed out of \$a->attempt grades were changed"; diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php index 8afa78dcf1..03fa2d6989 100644 --- a/mod/quiz/lib.php +++ b/mod/quiz/lib.php @@ -411,7 +411,9 @@ function quiz_print_quiz_questions($quiz, $results=NULL) { return false; } - echo "
"; + $strconfirmattempt = addslashes(get_string("readytosend", "quiz")); + + echo ""; echo "id\">"; foreach ($questions as $key => $questionid) {