mirror of
https://github.com/moodle/moodle.git
synced 2025-08-11 03:46:42 +02:00
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:
parent
d558080856
commit
0c1c764e82
5 changed files with 286 additions and 0 deletions
|
@ -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.' %';
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue