'.(++$rank).'. | '.$thisname.' | ';
switch ($gradeformat) {
case B_ACTIVITYRESULTS_GRADE_FORMAT_SCALE:
// Round answer up and locate appropriate scale.
$answer = (round($averagegrade, 0, PHP_ROUND_HALF_UP) - 1);
if (isset($scale[$answer])) {
$this->content->text .= $scale[$answer];
} else {
// Value is not in the scale.
$this->content->text .= get_string('unknown', 'block_activity_results');
}
break;
case B_ACTIVITYRESULTS_GRADE_FORMAT_FRA:
$this->content->text .= $this->activity_format_grade($averagegrade)
. '/' . $this->activity_format_grade($activity->grademax);
break;
case B_ACTIVITYRESULTS_GRADE_FORMAT_ABS:
$this->content->text .= $this->activity_format_grade($averagegrade);
break;
default:
case B_ACTIVITYRESULTS_GRADE_FORMAT_PCT:
$this->content->text .= $this->activity_format_grade((float)$averagegrade /
(float)$activity->grademax * 100).'%';
break;
}
$this->content->text .= ' |
';
}
$this->content->text .= '