From c5f1ff788dc7ebea91e7951ad906e03e5bfc9b22 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Thu, 20 Dec 2007 15:11:03 +0000 Subject: [PATCH] MDL-12675 - Give teachers a direct link from the quiz index page to the results. --- mod/quiz/index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mod/quiz/index.php b/mod/quiz/index.php index 074764c7e2..c131f6dad3 100644 --- a/mod/quiz/index.php +++ b/mod/quiz/index.php @@ -104,7 +104,12 @@ if ($showing == 'stats') { // The $quiz objects returned by get_all_instances_in_course have the necessary $cm // fields set to make the following call work. - $data[] = quiz_num_attempt_summary($quiz, $quiz); + $attemptcount = quiz_num_attempt_summary($quiz, $quiz); + if ($attemptcount) { + $data[] = "coursemodule\">$attemptcount"; + } else { + $data[] = ''; + } } else if ($showing = 'scores') { // Grade and feedback. -- 2.39.5