original_string: public static function display_name($record) {
          $syscontext = context_system::instance();
          if (!empty($record->component)) {
              $identifier = 'tagcollection_' .
                      clean_param($record->name, PARAM_STRINGID);
              $component = $record->component;
              if ($component === 'core') {
                  $component = 'tag';
              }
              return get_string($identifier, $component);
          }
          if (!empty($record->name)) {
              return format_string($record->name, true, array('context' => $syscontext));
          } else if ($record->isdefault) {
              return get_string('defautltagcoll', 'tag');
          } else {
              return $record->id;
          }
      }
code: public static function display_name($record) {
          $syscontext = context_system::instance();
          if (!empty($record->component)) {
              $identifier = 'tagcollection_' .
                      clean_param($record->name, PARAM_STRINGID);
              $component = $record->component;
              if ($component === 'core') {
                  $component = 'tag';
              }
              return get_string($identifier, $component);
          }
          if (!empty($record->name)) {
              return format_string($record->name, true, array('context' => $syscontext));
          } else if ($record->isdefault) {
              return get_string('defautltagcoll', 'tag');
          } else {
              return $record->id;
          }
      }
code_tokens: public static function display_name ( $ record ) { $ syscontext = context_system :: instance ( ) ; if ( ! empty ( $ record -> component ) ) { $ identifier = 'tagcollection_' . clean_param ( $ record -> name , PARAM_STRINGID ) ; $ component = $ record -> component ; if ( $ component === 'core' ) { $ component = 'tag' ; } return get_string ( $ identifier , $ component ) ; } if ( ! empty ( $ record -> name ) ) { return format_string ( $ record -> name , true , array ( 'context' => $ syscontext ) ) ; } else if ( $ record -> isdefault ) { return get_string ( 'defautltagcoll' , 'tag' ) ; } else { return $ record -> id ; } }
docstring: Returns formatted name of the tag collection
  
  @param stdClass $record record from DB table tag_coll
  @return string
docstring_tokens: Returns formatted name of the tag collection