Skip to content

Commit

Permalink
Fix notices in 'Students' without attempts mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhunt committed Jul 25, 2008
1 parent 10ae55f commit 3f8e526
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mod/quiz/report/responses/responses_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ function col_sumgrades($attempt){
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];
Expand Down

0 comments on commit 3f8e526

Please sign in to comment.