Issue Details (XML | Word | Printable)

Key: MDL-10856
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Yu Zhang
Reporter: Joseph Rézeau
Votes: 1
Watchers: 3
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

MP3 filter does not work in uploaded HTML files

Created: 15/Aug/07 05:23 PM   Updated: 17/Aug/07 12:59 PM
Return to search
Component/s: Filters
Affects Version/s: 1.8.2, 1.9
Fix Version/s: 1.8.3, 1.9

Participants: Joseph Rézeau, Martin Dougiamas, Petr Skoda and Yu Zhang
Security Level: None
Resolved date: 17/Aug/07
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE
Fixed Branches: MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
There is a bug with the new multimedia filter (from Moodle 1.8) with *.mp3 or *.swf files.
When such files are linked from a "composed Web page" within a Moodle course, it works OK.
But when such files are linked from an HTML uploaded file in the course files neither the moodle mp3 player nor the flash player are displayed.
From what I can gather, the "new Javascript system" does correctly write the necessary <object></object> code in the html file before displaying it FOR A COMPOSED WEB PAGE, but it does not write it to the HTML uploaded file.

Example with file audio.mp3:
in composed Web page we get this:
------------------------------------------
Click <a href="http://localhost/moodle18dev/moodle/file.php/2/course/audio.mp3">here</a><span style="visibility: visible;" class="mediaplugin mediaplugin_mp3" id="filter_mp3_11871632651"><object data="http://localhost/moodle18dev/moodle/filter/mediaplugin/mp3player.swf?src=http://localhost/moodle18dev/moodle/file.php/2/course/audio.mp3" type="application/x-shockwave-flash" height="15" width="90"><param value="high" name="quality"><param value="bgColour=000000&amp;amp;btnColour=ffffff&amp;amp;btnBorderColour=cccccc&amp;amp;iconColour=000000&amp;amp;iconOverColour=00cc00&amp;amp;trackColour=cccccc&amp;amp;handleColour=ffffff&amp;amp;loaderColour=ffffff&amp;amp;waitForPlay=yes" name="flashvars"></object></span>
<script type="text/javascript">
//<![CDATA[
  var FO = { movie:"http://localhost/moodle18dev/moodle/filter/mediaplugin/mp3player.swf?src=http://localhost/moodle18dev/moodle/file.php/2/course/audio.mp3",
    width:"90", height:"15", majorversion:"6", build:"40", flashvars:"bgColour=000000&amp;btnColour=ffffff&amp;btnBorderColour=cccccc&amp;iconColour=000000&amp;iconOverColour=00cc00&amp;trackColour=cccccc&amp;handleColour=ffffff&amp;loaderColour=ffffff&amp;waitForPlay=yes", quality: "high" };
  UFO.create(FO, "filter_mp3_11871632651");
//]]>
</script> to listen.
------------------------------
in HTML uploaded page we get this:
Click <a href="audio.mp3">here</a><span class="mediaplugin mediaplugin_mp3" id="filter_mp3_11871623921">(MP3 audio)</span>
<script type="text/javascript">
//<![CDATA[
  var FO = { movie:"http://localhost/moodle18dev/moodle/filter/mediaplugin/mp3player.swf?src=audio.mp3",
    width:"90", height:"15", majorversion:"6", build:"40", flashvars:"bgColour=000000&amp;btnColour=ffffff&amp;btnBorderColour=cccccc&amp;iconColour=000000&amp;iconOverColour=00cc00&amp;trackColour=cccccc&amp;handleColour=ffffff&amp;loaderColour=ffffff&amp;waitForPlay=yes", quality: "high" };
  UFO.create(FO, "filter_mp3_11871623921");
//]]>
</script> to listen.
----------------------------------------
I have checked in the Admin pages that my filters are ON, and Filter uploaded files is set to HTML files only. I have also checked that there is no path problem.

This is very urgent and important, as our university has upgraded from 1.6 to 1.8, we have a lot of mp3 files linked in our HMTL uploaded files and we do need this pb to be solved for the September new year.
Thanks in advance,
Joseph


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Martin Dougiamas added a comment - 16/Aug/07 10:08 AM
Yu, can you take a look at this please?

Yu Zhang added a comment - 16/Aug/07 01:34 PM
The problem is the ufo.js script needed was not included in a recourse linking to an uploaded file. I added the js file before the call. Cheers, Yu

Joseph Rézeau added a comment - 16/Aug/07 10:55 PM
Just tested the fix in 1.8 stable and 1.9 dev.
It works, but unfortunately only for ONE media file per uploaded HTML file (actually, the last one). This is not acceptable, since uploaded HTML file can have any number of media files.
Looking forward to final fix,
Joseph

Joseph Rézeau added a comment - 16/Aug/07 11:49 PM
Actually, the bug of having only ONE mp3 player displayed is worse than I thought: it happens in ALL Moodle resources (on Moodle1.8 and 1.9):
composed web pages, uploaded HTML pages, questions, etc. can only display ONE mp3 player, attached to the LAST mp3 file linked!!!
This is a serious bug especially for language teachers who use a lot of audio in their courses.
Joseph

Petr Skoda added a comment - 17/Aug/07 01:00 AM
I think it worked fine last time I did some changes there, but I am not sure now

Yu Zhang added a comment - 17/Aug/07 12:59 PM
Hi Joseph,

This javascript include is now in the <head> section of your html. This would prevent multiple includes and should fix this problem. Thanks.

Cheers,

Yu