MDL-46451 mod_lti: Fix restoring old float grades

LTI's activity table used to have a float
field for the grade.  Now it is an integer
so we must restore the grade as an integer
so it matches the table schema.
This commit is contained in:
Mark Nielsen
2014-08-26 09:10:34 -07:00
parent e609e6cf02
commit fe465d1d5b
@@ -74,6 +74,9 @@ class restore_lti_activity_structure_step extends restore_activity_structure_ste
$data->course = $this->get_courseid();
$data->servicesalt = uniqid('', true);
// Grade used to be a float (whole numbers only), restore as int.
$data->grade = (int) $data->grade;
// Clean any course or site typeid. All modules
// are restored as self-contained. Note this is
// an interim solution until the issue below is implemented.