Permalink
Browse files

FIXED: Removed Notice Warning. Sometimes an attempt's answerid field …

…is not set because the answer that the student entered does not match any of the answers for the question. This error comes up for Numerical and Short answer question types.
  • Loading branch information...
michaelpenne
michaelpenne committed Aug 29, 2005
1 parent 66fbb3b commit 71c47913a0681ccaa757a959bfedf8677a86d845
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/lesson/view.php
View
@@ -973,7 +973,9 @@
$essayquestions++;
$essayquestionpoints += $pageanswers[$attempt->answerid]->score;
} else {
- $score += $pageanswers[$attempt->answerid]->score;
+ if (array_key_exists($attempt->answerid, $pageanswers)) {
+ $score += $pageanswers[$attempt->answerid]->score;
+ }
}
}
$bestscores = array();

0 comments on commit 71c4791

Please sign in to comment.