Skip to content

Commit

Permalink
MDL-50959 gradebook: fix XML grade publishing score
Browse files Browse the repository at this point in the history
  • Loading branch information
lameze committed Sep 9, 2015
1 parent 8fb6ac2 commit 85dcae6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion grade/export/xml/grade_export_xml.php
Expand Up @@ -88,7 +88,14 @@ public function print_grades($feedback = false) {
fwrite($handle, "\t\t<assignment>{$grade_item->idnumber}</assignment>\n");
// this column should be customizable to use either student id, idnumber, uesrname or email.
fwrite($handle, "\t\t<student>{$user->idnumber}</student>\n");
fwrite($handle, "\t\t<score>$gradestr</score>\n");
// Format and display the grade in the selected display type (real, letter, percentage).
if (is_array($this->displaytype)) {
foreach ($this->displaytype as $gradedisplayconst) {
$gradestr = $this->format_grade($grade, $gradedisplayconst);
fwrite($handle, "\t\t<score>$gradestr</score>\n");
}
}

if ($this->export_feedback) {
$feedbackstr = $this->format_feedback($userdata->feedbacks[$itemid]);
fwrite($handle, "\t\t<feedback>$feedbackstr</feedback>\n");
Expand Down

0 comments on commit 85dcae6

Please sign in to comment.