From 3fcc331fee50b7bd7bbe36b5a825043da0f30322 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 29 Dec 2003 09:28:14 +0000 Subject: [PATCH] Better info about quizzes --- mod/quiz/index.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mod/quiz/index.php b/mod/quiz/index.php index 8c45220913..6d07ebbd39 100644 --- a/mod/quiz/index.php +++ b/mod/quiz/index.php @@ -53,6 +53,7 @@ $strbestgrade = get_string("bestgrade", "quiz"); $strquizcloses = get_string("quizcloses", "quiz"); $strattempts = get_string("attempts", "quiz"); + $strusers = get_string("users"); if (isteacher($course->id)) { $gradecol = $strattempts; @@ -95,9 +96,10 @@ if (isteacher($course->id)) { if ($allanswers = get_records("quiz_grades", "quiz", $quiz->id)) { - $answercount = count($allanswers); - $gradecol = "coursemodule\">" . - get_string("viewallanswers","quiz",$answercount).""; + $attemptcount = count_records_select("quiz_attempts", "quiz = '$quiz->id' AND timefinish > 0"); + $usercount = count_records("quiz_grades", "quiz", "$quiz->id"); + $strviewallanswers = get_string("viewallanswers","quiz",$attemptcount); + $gradecol = "id\">$strviewallanswers ($usercount $strusers)"; } else { $answercount = 0; $gradecol = ""; -- 2.39.5