Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

… tool types upon restore.
  • Loading branch information...
commit f2b7928df7b043b5f895b76b2b988ff82d8906a5 1 parent 1494f20
scriby scriby authored stronk7 committed

Showing 1 changed file with 0 additions and 18 deletions. Show diff stats Hide diff stats

  1. +0 18 mod/lti/backup/moodle2/restore_lti_stepslib.php
18 mod/lti/backup/moodle2/restore_lti_stepslib.php
@@ -74,29 +74,11 @@ protected function process_lti($data) {
74 74
75 75 $newitemid = lti_add_instance($data, null);
76 76
77   - // insert the basiclti record
78   - //$newitemid = $DB->insert_record('lti', $data);
79 77 // immediately after inserting "activity" record, call this
80 78 $this->apply_activity_instance($newitemid);
81 79 }
82 80
83 81 protected function after_execute() {
84   - global $DB;
85   -
86   - $basicltis = $DB->get_records('lti');
87   - foreach ($basicltis as $basiclti) {
88   - if (!$DB->get_record('lti_types_config',
89   - array('typeid' => $basiclti->typeid, 'name' => 'toolurl', 'value' => $basiclti->toolurl))) {
90   -
91   - $basiclti->typeid = 0;
92   - }
93   -
94   - $basiclti->placementsecret = uniqid('', true);
95   - $basiclti->timeplacementsecret = time();
96   -
97   - $DB->update_record('lti', $basiclti);
98   - }
99   -
100 82 // Add basiclti related files, no need to match by itemname (just internally handled context)
101 83 $this->add_related_files('mod_lti', 'intro', null);
102 84 }

0 comments on commit f2b7928

Please sign in to comment.
Something went wrong with that request. Please try again.