MDL-14203 "split report into two seperate reports - Quiz Statistics report and Individual Item Analysis report" started quiz statistics report in directory 'statistics'

This commit is contained in:
jamiesensei 2008-06-10 16:18:10 +00:00
parent d558080856
commit 0c1c764e82
5 changed files with 286 additions and 0 deletions

View file

@ -243,4 +243,16 @@ function quiz_report_feedback_for_grade($grade, $quizid) {
return $feedbacktext;
}
function quiz_report_scale_sumgrades_as_percentage($rawgrade, $quiz, $round = true) {
if ($quiz->sumgrades) {
$grade = $rawgrade * 100 / $quiz->sumgrades;
if ($round) {
$grade = number_format($grade, $quiz->decimalpoints);
}
} else {
$grade = 0;
}
return $grade.' %';
}
?>