]> git.mjollnir.org Git - moodle.git/commitdiff
Fix notices in 'Students' without attempts mode.
authortjhunt <tjhunt>
Fri, 25 Jul 2008 14:05:40 +0000 (14:05 +0000)
committertjhunt <tjhunt>
Fri, 25 Jul 2008 14:05:40 +0000 (14:05 +0000)
mod/quiz/report/responses/responses_table.php

index dd5d2b250c53a5ac730f0c740ef2e0b0653bf7ad..b410bfa0d6c915cd0dd65788038f6f06338e8059 100644 (file)
@@ -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];