Permalink
Browse files

MDL-45037 gradebook: Allow dashes in xml grade values to be ignored.

This was delivering an error message when trying to import an exported
xml file (from Moodle).
  • Loading branch information...
1 parent c16911b commit 7a1d3e4db8a33b2ac1c609b6833b96a4c4f6cfa9 @abgreeve abgreeve committed Apr 10, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 grade/import/xml/lib.php
@@ -82,7 +82,7 @@ function import_xml_grades($text, $course, &$error) {
$newgrade->importer = $USER->id;
// check grade value exists and is a numeric grade
- if (isset($result['#']['score'][0]['#'])) {
+ if (isset($result['#']['score'][0]['#']) && $result['#']['score'][0]['#'] !== '-') {
if (is_numeric($result['#']['score'][0]['#'])) {
$newgrade->finalgrade = $result['#']['score'][0]['#'];
} else {

0 comments on commit 7a1d3e4

Please sign in to comment.