Permalink
Browse files

Fixed a notice

  • Loading branch information...
1 parent 6c4294d commit 792947b68d31a328da4e98a163c9de122079cc36 moodler committed May 3, 2005
Showing with 5 additions and 4 deletions.
  1. +5 −4 mod/workshop/lib.php
View
@@ -1645,10 +1645,11 @@ function workshop_grade_assessments($workshop, $verbose=false) {
// this section looks at each submission if the number of assessments made has increased it recalculates the
// grading grades for those assessments
// first get the assignment elements for the weights and the stddevs...
- $elementsraw = get_records("workshop_elements", "workshopid", $workshop->id, "elementno ASC");
- foreach ($elementsraw as $element) {
- $weight[] = $element->weight; // to renumber index 0,1,2...
- $sd[] = $element->stddev; // to renumber index 0,1,2...
+ if ($elementsraw = get_records("workshop_elements", "workshopid", $workshop->id, "elementno ASC")) {
+ foreach ($elementsraw as $element) {
+ $weight[] = $element->weight; // to renumber index 0,1,2...
+ $sd[] = $element->stddev; // to renumber index 0,1,2...
+ }
}
unset($num); // may have been used in calculating stddevs

0 comments on commit 792947b

Please sign in to comment.