Skip to content

Commit

Permalink
MDL-10550 Fixed small bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasconnault committed Jul 26, 2007
1 parent 41b4772 commit e96cb4f
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions grade/report/outcomes/index.php
Expand Up @@ -65,9 +65,18 @@
WHERE itemid = $itemid
GROUP BY itemid";
$info = get_records_sql($sql);
$info = reset($info);
$report_info[$outcomeid]['items'][$itemid]->avg = round($info->avg, 2);
$report_info[$outcomeid]['items'][$itemid]->count = $info->count;

if (!$info) {
unset($report_info[$outcomeid]['items'][$itemid]);
continue;
} else {
$info = reset($info);
$avg = round($info->avg, 2);
$count = $info->count;
}

$report_info[$outcomeid]['items'][$itemid]->avg = $avg;
$report_info[$outcomeid]['items'][$itemid]->count = $count;
}
}
}
Expand Down

0 comments on commit e96cb4f

Please sign in to comment.