original_string: protected function process_quiz_slot_tags($data) {
          global $DB;
  
          $data = (object)$data;
  
          $data->slotid = $this->get_new_parentid('quiz_question_instance');
          if ($this->task->is_samesite() && $tag = core_tag_tag::get($data->tagid, 'id, name')) {
              $data->tagname = $tag->name;
          } else if ($tag = core_tag_tag::get_by_name(0, $data->tagname, 'id, name')) {
              $data->tagid = $tag->id;
          } else {
              $data->tagid = null;
              $data->tagname = $tag->name;
          }
  
          $DB->insert_record('quiz_slot_tags', $data);
      }
code: protected function process_quiz_slot_tags($data) {
          global $DB;
  
          $data = (object)$data;
  
          $data->slotid = $this->get_new_parentid('quiz_question_instance');
          if ($this->task->is_samesite() && $tag = core_tag_tag::get($data->tagid, 'id, name')) {
              $data->tagname = $tag->name;
          } else if ($tag = core_tag_tag::get_by_name(0, $data->tagname, 'id, name')) {
              $data->tagid = $tag->id;
          } else {
              $data->tagid = null;
              $data->tagname = $tag->name;
          }
  
          $DB->insert_record('quiz_slot_tags', $data);
      }
code_tokens: protected function process_quiz_slot_tags ( $ data ) { global $ DB ; $ data = ( object ) $ data ; $ data -> slotid = $ this -> get_new_parentid ( 'quiz_question_instance' ) ; if ( $ this -> task -> is_samesite ( ) && $ tag = core_tag_tag :: get ( $ data -> tagid , 'id, name' ) ) { $ data -> tagname = $ tag -> name ; } else if ( $ tag = core_tag_tag :: get_by_name ( 0 , $ data -> tagname , 'id, name' ) ) { $ data -> tagid = $ tag -> id ; } else { $ data -> tagid = null ; $ data -> tagname = $ tag -> name ; } $ DB -> insert_record ( 'quiz_slot_tags' , $ data ) ; }
docstring: Process a quiz_slot_tags restore
  
  @param stdClass|array $data The quiz_slot_tags data
docstring_tokens: Process a quiz_slot_tags restore