Skip to content

Commit

Permalink
MDL-32614: Removing code which disassociated LTI instances from their…
Browse files Browse the repository at this point in the history
… tool types upon restore.
  • Loading branch information
scriby authored and stronk7 committed Jul 3, 2012
1 parent d71b79a commit 420e674
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions mod/lti/backup/moodle2/restore_lti_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 420e674

Please sign in to comment.