public static function make_display_name($tag, $ashtml = true) {
        global $CFG;

        if (empty($CFG->keeptagnamecase)) {
            // This is the normalized tag name.
            $tagname = core_text::strtotitle($tag->name);
        } else {
            // Original casing of the tag name.
            $tagname = $tag->rawname;
        }

        // Clean up a bit just in case the rules change again.
        $tagname = clean_param($tagname, PARAM_TAG);

        return $ashtml ? htmlspecialchars($tagname) : $tagname;
    }
public static function make_display_name($tag, $ashtml = true) {
        global $CFG;

        if (empty($CFG->keeptagnamecase)) {
            // This is the normalized tag name.
            $tagname = core_text::strtotitle($tag->name);
        } else {
            // Original casing of the tag name.
            $tagname = $tag->rawname;
        }

        // Clean up a bit just in case the rules change again.
        $tagname = clean_param($tagname, PARAM_TAG);

        return $ashtml ? htmlspecialchars($tagname) : $tagname;
    }
public static function make_display_name ( $ tag , $ ashtml = true ) { global $ CFG ; if ( empty ( $ CFG -> keeptagnamecase ) ) { // This is the normalized tag name. $ tagname = core_text :: strtotitle ( $ tag -> name ) ; } else { // Original casing of the tag name. $ tagname = $ tag -> rawname ; } // Clean up a bit just in case the rules change again. $ tagname = clean_param ( $ tagname , PARAM_TAG ) ; return $ ashtml ? htmlspecialchars ( $ tagname ) : $ tagname ; }
Prepares tag name ready to be displayed

@param stdClass|core_tag_tag $tag record from db table tag, must contain properties name and rawname
@param bool $ashtml (default true) if true will return htmlspecialchars encoded string
@return string
Prepares tag name ready to be displayed