original_string: public function process_enrol_lti_tool($data) {
          global $DB;
  
          $data = (object) $data;
  
          // Store the old id.
          $oldid = $data->id;
  
          // Change the values before we insert it.
          $data->timecreated = time();
          $data->timemodified = $data->timecreated;
  
          // Now we can insert the new record.
          $data->id = $DB->insert_record('enrol_lti_tools', $data);
  
          // Add the array of tools we need to process later.
          $this->tools[$data->id] = $data;
  
          // Set up the mapping.
          $this->set_mapping('enrol_lti_tool', $oldid, $data->id);
      }
code: public function process_enrol_lti_tool($data) {
          global $DB;
  
          $data = (object) $data;
  
          // Store the old id.
          $oldid = $data->id;
  
          // Change the values before we insert it.
          $data->timecreated = time();
          $data->timemodified = $data->timecreated;
  
          // Now we can insert the new record.
          $data->id = $DB->insert_record('enrol_lti_tools', $data);
  
          // Add the array of tools we need to process later.
          $this->tools[$data->id] = $data;
  
          // Set up the mapping.
          $this->set_mapping('enrol_lti_tool', $oldid, $data->id);
      }
code_tokens: public function process_enrol_lti_tool ( $ data ) { global $ DB ; $ data = ( object ) $ data ; // Store the old id. $ oldid = $ data -> id ; // Change the values before we insert it. $ data -> timecreated = time ( ) ; $ data -> timemodified = $ data -> timecreated ; // Now we can insert the new record. $ data -> id = $ DB -> insert_record ( 'enrol_lti_tools' , $ data ) ; // Add the array of tools we need to process later. $ this -> tools [ $ data -> id ] = $ data ; // Set up the mapping. $ this -> set_mapping ( 'enrol_lti_tool' , $ oldid , $ data -> id ) ; }
docstring: Processes LTI tools element data
  
  @param array|stdClass $data
docstring_tokens: Processes LTI tools element data