From: tjhunt Date: Fri, 25 Jul 2008 14:05:40 +0000 (+0000) Subject: Fix notices in 'Students' without attempts mode. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3f8e526ec10092043ead8b1e9121d0bb99af1a6d;p=moodle.git Fix notices in 'Students' without attempts mode. --- 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];