Permalink
Browse files

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

… restore.
  • Loading branch information...
1 parent d2aa53b commit 58672659c6f2e9b1a1f321982272b8a15077650c @colin-umn colin-umn committed with markn86 Aug 27, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 mod/assign/backup/moodle2/restore_assign_stepslib.php
@@ -100,6 +100,10 @@ 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);
$this->apply_activity_instance($newitemid);

0 comments on commit 5867265

Please sign in to comment.