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);
    }