Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

… restore.
  • Loading branch information...
commit 7e8638914f6d5d2086fbe033ca86093f3ddf7fa9 1 parent abb7671
@colin-umn colin-umn authored markn86 committed
Showing with 3 additions and 0 deletions.
  1. +3 −0  mod/assign/backup/moodle2/restore_assign_stepslib.php
View
3  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);
Please sign in to comment.
Something went wrong with that request. Please try again.