public function message_code_name($msgcode) {

        $stringman = get_string_manager();

        if ($stringman->string_exists('validationmsg_'.$msgcode, 'core_plugin')) {
            return get_string('validationmsg_'.$msgcode, 'core_plugin');
        }

        return $msgcode;
    }
public function message_code_name($msgcode) {

        $stringman = get_string_manager();

        if ($stringman->string_exists('validationmsg_'.$msgcode, 'core_plugin')) {
            return get_string('validationmsg_'.$msgcode, 'core_plugin');
        }

        return $msgcode;
    }
public function message_code_name ( $ msgcode ) { $ stringman = get_string_manager ( ) ; if ( $ stringman -> string_exists ( 'validationmsg_' . $ msgcode , 'core_plugin' ) ) { return get_string ( 'validationmsg_' . $ msgcode , 'core_plugin' ) ; } return $ msgcode ; }
If defined, returns human readable validation code.

Otherwise, it simply returns the code itself as a fallback.

@param string $msgcode
@return string
If defined returns human readable validation code .