Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'MDL-36336_modLtiRestoreGrade' of git://github.com/moodl…

…erooms/moodle
  • Loading branch information...
commit 97df01569076f6f0bc1f110a90d127ecf54e2968 2 parents 6167bad + 610b86f
@samhemelryk samhemelryk authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 mod/lti/backup/moodle2/restore_lti_stepslib.php
View
6 mod/lti/backup/moodle2/restore_lti_stepslib.php
@@ -64,20 +64,20 @@ protected function define_structure() {
}
protected function process_lti($data) {
- global $DB, $CFG;
+ global $DB;
$data = (object)$data;
$oldid = $data->id;
$data->course = $this->get_courseid();
+ $data->servicesalt = uniqid('', true);
- require_once($CFG->dirroot.'/mod/lti/lib.php');
// 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.
// TODO: MDL-34161 - Fix restore to support course/site tools & submissions.
$data->typeid = 0;
- $newitemid = lti_add_instance($data, null);
+ $newitemid = $DB->insert_record('lti', $data);
// immediately after inserting "activity" record, call this
$this->apply_activity_instance($newitemid);
Please sign in to comment.
Something went wrong with that request. Please try again.