Skip to content
Permalink
Browse files

MDL-32614: Removing code which disassociated LTI instances from their…

… tool types upon restore.
  • Loading branch information
scriby authored and stronk7 committed Jun 13, 2012
1 parent d71b79a commit 420e6740e9ad6684290648c3b0930c917bf66842
Showing with 0 additions and 18 deletions.
  1. +0 −18 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);
}

0 comments on commit 420e674

Please sign in to comment.
You can’t perform that action at this time.