Permalink
Browse files

MDL-40214 mod_assign: Fixed issue with custom scale being lost during…

… restore.
  • Loading branch information...
colin-umn authored and markn86 committed Aug 27, 2013
1 parent abb7671 commit 7e8638914f6d5d2086fbe033ca86093f3ddf7fa9
Showing with 3 additions and 0 deletions.
  1. +3 −0 mod/assign/backup/moodle2/restore_assign_stepslib.php
@@ -89,6 +89,9 @@ protected function process_assign($data) {
$data->cutoffdate = $this->apply_date_offset($data->cutoffdate);
}
+ if ($data->grade < 0) { // Scale found, get mapping.
+ $data->grade = -($this->get_mappingid('scale', abs($data->grade)));
+ }
$newitemid = $DB->insert_record('assign', $data);

0 comments on commit 7e86389

Please sign in to comment.