Merge branch 'wip-MDL-45037-master' of git://github.com/abgreeve/moodle
authorSam Hemelryk <sam@moodle.com>
Mon, 21 Apr 2014 21:59:01 +0000 (09:59 +1200)
committerSam Hemelryk <sam@moodle.com>
Mon, 21 Apr 2014 21:59:01 +0000 (09:59 +1200)
grade/import/xml/lib.php

index 3e059f8..3984cca 100644 (file)
@@ -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 {