original_string: protected function process_data_record_tag($data) {
          $data = (object)$data;
  
          if (!core_tag_tag::is_enabled('mod_data', 'data_records')) { // Tags disabled in server, nothing to process.
              return;
          }
  
          if (!$itemid = $this->get_mappingid('data_record', $data->itemid)) {
              // Some orphaned tag, we could not find the data record for it - ignore.
              return;
          }
  
          $tag = $data->rawname;
          $context = context_module::instance($this->task->get_moduleid());
          core_tag_tag::add_item_tag('mod_data', 'data_records', $itemid, $context, $tag);
      }
code: protected function process_data_record_tag($data) {
          $data = (object)$data;
  
          if (!core_tag_tag::is_enabled('mod_data', 'data_records')) { // Tags disabled in server, nothing to process.
              return;
          }
  
          if (!$itemid = $this->get_mappingid('data_record', $data->itemid)) {
              // Some orphaned tag, we could not find the data record for it - ignore.
              return;
          }
  
          $tag = $data->rawname;
          $context = context_module::instance($this->task->get_moduleid());
          core_tag_tag::add_item_tag('mod_data', 'data_records', $itemid, $context, $tag);
      }
code_tokens: protected function process_data_record_tag ( $ data ) { $ data = ( object ) $ data ; if ( ! core_tag_tag :: is_enabled ( 'mod_data' , 'data_records' ) ) { // Tags disabled in server, nothing to process. return ; } if ( ! $ itemid = $ this -> get_mappingid ( 'data_record' , $ data -> itemid ) ) { // Some orphaned tag, we could not find the data record for it - ignore. return ; } $ tag = $ data -> rawname ; $ context = context_module :: instance ( $ this -> task -> get_moduleid ( ) ) ; core_tag_tag :: add_item_tag ( 'mod_data' , 'data_records' , $ itemid , $ context , $ tag ) ; }
docstring: Add tags to restored records.
  
  @param stdClass $data Tag
docstring_tokens: Add tags to restored records .