public function after_restore_enrol() {
        global $DB;

        // Need to go through and change the values.
        foreach ($this->tools as $tool) {
            $updatetool = new stdClass();
            $updatetool->id = $tool->id;
            $updatetool->enrolid = $this->get_mappingid('enrol', $tool->enrolid);
            $updatetool->contextid = $this->get_mappingid('context', $tool->contextid);
            $DB->update_record('enrol_lti_tools', $updatetool);
        }
    }
public function after_restore_enrol() {
        global $DB;

        // Need to go through and change the values.
        foreach ($this->tools as $tool) {
            $updatetool = new stdClass();
            $updatetool->id = $tool->id;
            $updatetool->enrolid = $this->get_mappingid('enrol', $tool->enrolid);
            $updatetool->contextid = $this->get_mappingid('context', $tool->contextid);
            $DB->update_record('enrol_lti_tools', $updatetool);
        }
    }
public function after_restore_enrol ( ) { global $ DB ; // Need to go through and change the values. foreach ( $ this -> tools as $ tool ) { $ updatetool = new stdClass ( ) ; $ updatetool -> id = $ tool -> id ; $ updatetool -> enrolid = $ this -> get_mappingid ( 'enrol' , $ tool -> enrolid ) ; $ updatetool -> contextid = $ this -> get_mappingid ( 'context' , $ tool -> contextid ) ; $ DB -> update_record ( 'enrol_lti_tools' , $ updatetool ) ; } }
This function is executed after all the tasks in the plan have been finished.
This must be done here because the activities have not been restored yet.
This function is executed after all the tasks in the plan have been finished . This must be done here because the activities have not been restored yet .