';
echo '
';
echo 'Course | Average |
';
foreach ($courses as $c) {
$coursecontext = context_course::instance($c->course_id);
$shortname = format_string($c->shortname, true, array('context' => $coursecontext));
echo '';
echo ''.$shortname.' | ';
echo '';
echo format_float(($c->sumvalue / $c->countvalue), 2);
echo ' | ';
echo '
';
}
echo '
';
} else {
echo '
'.get_string('noresults').'
';
}
echo '
';
echo get_string('back');
echo '
';
} else {
// Print the items in an analysed form.
foreach ($items as $item) {
echo '
';
$itemobj = feedback_get_item_class($item->typ);
$printnr = ($feedback->autonumbering && $item->itemnr) ? ($item->itemnr . '.') : '';
$itemobj->print_analysed($item, $printnr, $mygroupid, $feedbackstructure->get_courseid());
if (preg_match('/rated$/i', $item->typ)) {
$url = new moodle_url('/mod/feedback/analysis_course.php', array('id' => $id,
'courseitemfilter' => $item->id, 'courseitemfiltertyp' => $item->typ));
$anker = html_writer::link($url, get_string('sort_by_course', 'feedback'));
echo ''.$anker.' |
';
}
echo '
';
}
}
echo $OUTPUT->footer();