From 420e6740e9ad6684290648c3b0930c917bf66842 Mon Sep 17 00:00:00 2001 From: Chris Scribner Date: Wed, 13 Jun 2012 14:19:35 -0400 Subject: [PATCH] MDL-32614: Removing code which disassociated LTI instances from their tool types upon restore. --- .../backup/moodle2/restore_lti_stepslib.php | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/mod/lti/backup/moodle2/restore_lti_stepslib.php b/mod/lti/backup/moodle2/restore_lti_stepslib.php index 8589e2e129a61..2866918e73b60 100644 --- a/mod/lti/backup/moodle2/restore_lti_stepslib.php +++ b/mod/lti/backup/moodle2/restore_lti_stepslib.php @@ -74,29 +74,11 @@ protected function process_lti($data) { $newitemid = lti_add_instance($data, null); - // insert the basiclti record - //$newitemid = $DB->insert_record('lti', $data); // immediately after inserting "activity" record, call this $this->apply_activity_instance($newitemid); } protected function after_execute() { - global $DB; - - $basicltis = $DB->get_records('lti'); - foreach ($basicltis as $basiclti) { - if (!$DB->get_record('lti_types_config', - array('typeid' => $basiclti->typeid, 'name' => 'toolurl', 'value' => $basiclti->toolurl))) { - - $basiclti->typeid = 0; - } - - $basiclti->placementsecret = uniqid('', true); - $basiclti->timeplacementsecret = time(); - - $DB->update_record('lti', $basiclti); - } - // Add basiclti related files, no need to match by itemname (just internally handled context) $this->add_related_files('mod_lti', 'intro', null); }