From: moodler Date: Wed, 19 May 2004 03:22:21 +0000 (+0000) Subject: If a quiz has been attempted and the teacher is editing the quiz, X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=56215ed40f5f46aa0d1943585784e7327ea724e7;p=moodle.git If a quiz has been attempted and the teacher is editing the quiz, then let them know about the attempts. bug 321 Thanks, Bernard! --- diff --git a/lang/en/quiz.php b/lang/en/quiz.php index 8cdfc4ec8d..69c6ca589f 100644 --- a/lang/en/quiz.php +++ b/lang/en/quiz.php @@ -24,6 +24,7 @@ $string['attemptlast'] = 'Last attempt'; $string['attemptquiznow'] = 'Attempt quiz now'; $string['attempts'] = 'Attempts'; $string['attemptsallowed'] = 'Attempts allowed'; +$string['attemptsexist'] = 'This quiz has already been attempted'; $string['attemptincomplete'] = 'That attempt (by $a) is not yet completed.'; $string['attemptsunlimited'] = 'Unlimited attempts'; $string['backtoquiz'] = 'Back to quiz editing'; diff --git a/mod/quiz/edit.php b/mod/quiz/edit.php index 204baaddd2..7b0c354963 100644 --- a/mod/quiz/edit.php +++ b/mod/quiz/edit.php @@ -161,9 +161,7 @@ $strname = get_string('name'); $strquizzes = get_string('modulenameplural', 'quiz'); - $strediting = get_string(isset($modform->instance) ? "editingquiz" - : "editquestions", - "quiz"); + $strediting = get_string(isset($modform->instance) ? "editingquiz" : "editquestions", "quiz"); $strheading = empty($modform->name) ? $strediting : $modform->name; print_header("$course->shortname: $strediting", "$course->shortname: $strheading", @@ -185,6 +183,17 @@ ?>

 

+ instance' AND timefinish > 0")) { + $strviewallanswers = get_string("viewallanswers","quiz",$attemptcount); + $strattemptsexist = get_string("attemptsexist","quiz"); + $usercount = count_records("quiz_grades", "quiz", "$modform->instance"); + $strusers = get_string("users"); + notify("$strattemptsexist
instance\">$strviewallanswers ($usercount $strusers)"); + } + + ?>
destination ?>> "> @@ -192,6 +201,8 @@
'; }