mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-63958 course: Return raw mimetype apart from description
This commit is contained in:
parent
08c51ff080
commit
34ad1a017e
2 changed files with 22 additions and 0 deletions
|
@ -305,6 +305,7 @@ function resource_get_file_details($resource, $cm) {
|
|||
if (!empty($options['showtype'])) {
|
||||
if ($mainfile) {
|
||||
$filedetails['type'] = get_mimetype_description($mainfile);
|
||||
$filedetails['mimetype'] = $mainfile->get_mimetype();
|
||||
// Only show type if it is not unknown.
|
||||
if ($filedetails['type'] === get_mimetype_description('document/unknown')) {
|
||||
$filedetails['type'] = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue