-
Bug
-
Resolution: Fixed
-
Minor
-
2.3.6, 2.4.3
-
MOODLE_23_STABLE, MOODLE_24_STABLE
-
MOODLE_23_STABLE, MOODLE_24_STABLE
-
m25_
MDL-38468_Fix_MHTML_files_delivery -
-
See discussion at http://moodle.org/mod/forum/discuss.php?d=224274
Moodle is not able to handle mht/mhtml links, for example within a SCORM package. When a user tries to open such a file in Internet Explorer, the source code is shown. Other browsers with appropriate extensions which are able to handle mht/mhtml files behave in the same way.
This is especially an issue with Microsoft IT Academy packages. These packages contain several mht/mhtml links.
Proposed fix:
Edit lib/filelib.php.
At about line 1505, between
'mpg' => array ('type'=>'video/mpeg', 'icon'=>'mpeg', 'groups'=>array('video','web_video'), 'string'=>'video'),
and
'nbk' => array ('type'=>'application/x-smarttech-notebook', 'icon'=>'archive'),
insert the following code:
'mht' => array ('type'=>'message/rfc822', 'icon'=>'archive'),
'mhtml' => array ('type'=>'message/rfc822', 'icon'=>'archive'),
Save the file.
If you already published a SCORM package, it is necessary to publish it again. Do so by editing the package and uploading the files again. Save the package and verify the fix with Internet Explorer.
Thanks to all participants in the forum thread, especially to Matteo Scaramuccia.