original_string: 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);
          }
      }
code: 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);
          }
      }
code_tokens: 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 ) ; } }
docstring: 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.
docstring_tokens: 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 .