Skip to content

Commit

Permalink
Some small changes to avoid notices
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Mar 7, 2007
1 parent 86c91b1 commit 64a6329
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mod/workshop/lib.php
Expand Up @@ -1218,14 +1218,18 @@ function workshop_compare_assessments($workshop, $assessment1, $assessment2) {
$maxscore[] = $element->maxscore; // to renumber index 0,1,2...
$weight[] = $WORKSHOP_EWEIGHTS[$element->weight]; // get real value and renumber index 0,1,2...
}

$grades = array();
for ($i = 0; $i < 2; $i++) {
if ($i) {
$rawgrades = get_records("workshop_grades", "assessmentid", $assessment1->id, "elementno ASC");
} else {
$rawgrades = get_records("workshop_grades", "assessmentid", $assessment2->id, "elementno ASC");
}
foreach ($rawgrades as $grade) {
$grades[$i][] = $grade->grade;
if ($rawgrades) {
foreach ($rawgrades as $grade) {
$grades[$i][] = $grade->grade;
}
}
}
$sumdiffs = 0;
Expand Down

0 comments on commit 64a6329

Please sign in to comment.