protected function display_name_from_file($filename) {
        $pos = core_text::strrpos($filename, '.');
        if ($pos) { // Want to skip if $pos === 0 OR $pos === false.
            $filename = core_text::substr($filename, 0, $pos);
        }
        return str_replace('_', ' ', $filename);
    }
protected function display_name_from_file($filename) {
        $pos = core_text::strrpos($filename, '.');
        if ($pos) { // Want to skip if $pos === 0 OR $pos === false.
            $filename = core_text::substr($filename, 0, $pos);
        }
        return str_replace('_', ' ', $filename);
    }
protected function display_name_from_file ( $ filename ) { $ pos = core_text :: strrpos ( $ filename , '.' ) ; if ( $ pos ) { // Want to skip if $pos === 0 OR $pos === false. $ filename = core_text :: substr ( $ filename , 0 , $ pos ) ; } return str_replace ( '_' , ' ' , $ filename ) ; }
Generate the name of the mod instance from the name of the file
(remove the extension and convert underscore => space

@param string $filename the filename of the uploaded file
@return string the display name to use
Generate the name of the mod instance from the name of the file ( remove the extension and convert underscore = > space