From 3f8e526ec10092043ead8b1e9121d0bb99af1a6d Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 25 Jul 2008 14:05:40 +0000 Subject: [PATCH] Fix notices in 'Students' without attempts mode. --- mod/quiz/report/responses/responses_table.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mod/quiz/report/responses/responses_table.php b/mod/quiz/report/responses/responses_table.php index dd5d2b250c..b410bfa0d6 100644 --- a/mod/quiz/report/responses/responses_table.php +++ b/mod/quiz/report/responses/responses_table.php @@ -139,7 +139,10 @@ class quiz_report_responses_table extends table_sql { function other_cols($colname, $attempt){ static $states =array(); if (preg_match('/^qsanswer([0-9]+)$/', $colname, $matches)){ - if ($attempt->uniqueid > 0 && !isset($states[$attempt->uniqueid])){ + if ($attempt->uniqueid == 0) { + return '-'; + } + if (!isset($states[$attempt->uniqueid])){ $states[$attempt->uniqueid] = get_question_states($this->questions, $this->quiz, $attempt); } $statesforattempt = $states[$attempt->uniqueid]; -- 2.39.5