Non-core contributed modules

Update from 1.8.7+(20081115) to 1.8.8+ (20090416) breaks media player in hot potato quiz window

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.11
  • Fix Version/s: None
  • Component/s: Module: HotPot
  • Labels:
    None
  • Environment:
    CentOS server, PHP 5.2.6, Apache 2.0.52
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_19_STABLE

Description

Site is using a large number or embeded audio clips for quizzes. Prior to the update to 1.8.8+ the quiz would show an audio player which students could listed to before attempting the quiz answers. After the update, the media player disappeared. On swapping out the new lib.php (1.66.2.23) for the old one (1.66.2.20) the player re-appeared and worked again. No error messages in the server logs or in debug that I could see. Couldn't test extensively as it is a client site.

  1. errors-1.fixed.htm
    23/Apr/09 1:15 PM
    56 kB
    Gordon Bateson
  2. errors-1.htm
    22/Apr/09 11:54 PM
    56 kB
    Paul Taylor
  3. listening-17-new.htm
    18/Apr/09 2:40 AM
    48 kB
    Paul Taylor

Activity

Hide
Gordon Bateson added a comment -

Would it be possible to upload the source file of the quiz in question?

Show
Gordon Bateson added a comment - Would it be possible to upload the source file of the quiz in question?
Hide
Gordon Bateson added a comment -

On Moodle 1.8.8+ (using mod/hotpot/lib.php 1.66.2.23) I tried running a simple JCloze file containing a relative url link to an mp3 file and the media player was correctly inserted.

So I would very much grateful if you could upload an actual example of a quiz file that does not work as expected, so that I can investigate further.

You are also welcome to test out the quiz on my Moodle 1.8.8+ server:

URL: http://bateson.kanazawa-gu.ac.jp/moodle/18/mysql/
Course: Course Fullname 101
Username: guestteacher
Password: quizportv09

thanks
Gordon

Show
Gordon Bateson added a comment - On Moodle 1.8.8+ (using mod/hotpot/lib.php 1.66.2.23) I tried running a simple JCloze file containing a relative url link to an mp3 file and the media player was correctly inserted. So I would very much grateful if you could upload an actual example of a quiz file that does not work as expected, so that I can investigate further. You are also welcome to test out the quiz on my Moodle 1.8.8+ server: URL: http://bateson.kanazawa-gu.ac.jp/moodle/18/mysql/ Course: Course Fullname 101 Username: guestteacher Password: quizportv09 thanks Gordon
Hide
Paul Taylor added a comment -

This is one file that did not work on the server yesterday with the new lib.php file. As I said, I had to put the old lib.php file in straight away to "fix" it, so it will be hard to replicate again as it is a very active site. I'm not entirely sure it wasn't the fact that I had also changed one of the .js files to 755. Sorry to be so vague. It may have been a time issue?

Show
Paul Taylor added a comment - This is one file that did not work on the server yesterday with the new lib.php file. As I said, I had to put the old lib.php file in straight away to "fix" it, so it will be hard to replicate again as it is a very active site. I'm not entirely sure it wasn't the fact that I had also changed one of the .js files to 755. Sorry to be so vague. It may have been a time issue?
Hide
Paul Taylor added a comment -

This file played fine on my Linux laptop, but none of these worked at all yesterday on the server until I changed the lib.php file and the customer had the same experience.

Show
Paul Taylor added a comment - This file played fine on my Linux laptop, but none of these worked at all yesterday on the server until I changed the lib.php file and the customer had the same experience.
Hide
Gordon Bateson added a comment -

Please reinstate the the "new" mod/hotpot/lib.php file (i.e. version 1.66.2.23) and modify it as follows:

1. locate the following line (around line 1755)
$filetype = "avi|mpeg|mpg|mp3|mov|wmv|swf|flv";

2. replace the above line with the following lines
$filetype = "avi|mpeg|mpg|mp3|mov|wmv|flv";
if ($CFG->filter_mediaplugin_enable_swf) { $filetype .= '|swf'; }

3. save the modified file

Now check whether the HotPot that you sent me, listening-17-new.htm, works on your client's site.

thanks
Gordon

Show
Gordon Bateson added a comment - Please reinstate the the "new" mod/hotpot/lib.php file (i.e. version 1.66.2.23) and modify it as follows: 1. locate the following line (around line 1755) $filetype = "avi|mpeg|mpg|mp3|mov|wmv|swf|flv"; 2. replace the above line with the following lines $filetype = "avi|mpeg|mpg|mp3|mov|wmv|flv"; if ($CFG->filter_mediaplugin_enable_swf) { $filetype .= '|swf'; } 3. save the modified file Now check whether the HotPot that you sent me, listening-17-new.htm, works on your client's site. thanks Gordon
Hide
Gordon Bateson added a comment -

For reference the differences between version 1.66.2.20 and 1.66.2.23 of "mod/hotpot/lib.php" on Moodle 1.8 are listed here:

http://cvs.moodle.org/moodle/mod/hotpot/lib.php?r1=1.66.2.20&r2=1.66.2.23

Show
Gordon Bateson added a comment - For reference the differences between version 1.66.2.20 and 1.66.2.23 of "mod/hotpot/lib.php" on Moodle 1.8 are listed here: http://cvs.moodle.org/moodle/mod/hotpot/lib.php?r1=1.66.2.20&r2=1.66.2.23
Hide
Paul Taylor added a comment -

Hi Gordon:

That file modification worked fine. Thank you very much.

Paul

Show
Paul Taylor added a comment - Hi Gordon: That file modification worked fine. Thank you very much. Paul
Hide
Gordon Bateson added a comment -

Thanks for the confirmation Paul.
I will go ahead and make this change to the Moodle CVS files.

all the best
Gordon

Show
Gordon Bateson added a comment - Thanks for the confirmation Paul. I will go ahead and make this change to the Moodle CVS files. all the best Gordon
Hide
Gordon Bateson added a comment -

Committed patches for Moodle 1.6 - 1.9 and HEAD.
thanks for reporting and this issue and confirming the fix!

Show
Gordon Bateson added a comment - Committed patches for Moodle 1.6 - 1.9 and HEAD. thanks for reporting and this issue and confirming the fix!
Hide
Paul Taylor added a comment -

Hi Gordon:

I have another issue now. Should I start a new tracker? The customer says that their error correction quizzes used to work, but now they don't. I can confirm this, and the "old" lib.php file made no difference so it could be another update? The only error I can get is with debug on full, but probably not very meaningful. Would it be helpful to have a login to see?

Paul

Show
Paul Taylor added a comment - Hi Gordon: I have another issue now. Should I start a new tracker? The customer says that their error correction quizzes used to work, but now they don't. I can confirm this, and the "old" lib.php file made no difference so it could be another update? The only error I can get is with debug on full, but probably not very meaningful. Would it be helpful to have a login to see? Paul
Hide
Paul Taylor added a comment -

I spoke too soon. Putting the "old" lib.php file back in made it work fine in Opera and IE, but it still didn't work in Firefox on my Linux box. Seems like there is still a render issue in the old lib.php, at least in FF.

Show
Paul Taylor added a comment - I spoke too soon. Putting the "old" lib.php file back in made it work fine in Opera and IE, but it still didn't work in Firefox on my Linux box. Seems like there is still a render issue in the old lib.php, at least in FF.
Hide
Paul Taylor added a comment -

Stranger still, some of them display OK in FF, but most don't.

Show
Paul Taylor added a comment - Stranger still, some of them display OK in FF, but most don't.
Hide
Paul Taylor added a comment -

This is an error correction exercise. The line numbers have a box on the right that students have to fill in. With the new lib.php, the boxes and numbers do not appear. With the old lib.php, they work fine in most browsers, though this one didn't work in FF 3.0.8.

Show
Paul Taylor added a comment - This is an error correction exercise. The line numbers have a box on the right that students have to fill in. With the new lib.php, the boxes and numbers do not appear. With the old lib.php, they work fine in most browsers, though this one didn't work in FF 3.0.8.
Hide
Gordon Bateson added a comment -

Probably we should have started a new issue for this latest problem, but since we have started here let's continue ...

thanks for the new file, I will take a look

Show
Gordon Bateson added a comment - Probably we should have started a new issue for this latest problem, but since we have started here let's continue ... thanks for the new file, I will take a look
Hide
Gordon Bateson added a comment -

The error is caused by invalid xhtml in the quiz file. It is not caused by anything that the HotPot module inserts.

Please check the html in the source file at the folowing URL:
http://validator.w3.org/#validate_by_upload
and fix the 89 syntax errors reported there first.

Probably the errors are caused by unclosed <p> tags in the quiz introduction.

Once your source file passes the above test, I believe it will work with the HotPot module. If it doesn't please let me know.

Show
Gordon Bateson added a comment - The error is caused by invalid xhtml in the quiz file. It is not caused by anything that the HotPot module inserts. Please check the html in the source file at the folowing URL: http://validator.w3.org/#validate_by_upload and fix the 89 syntax errors reported there first. Probably the errors are caused by unclosed <p> tags in the quiz introduction. Once your source file passes the above test, I believe it will work with the HotPot module. If it doesn't please let me know.
Hide
Gordon Bateson added a comment -

I have fixed the html in the "instructions" and "reading" part of the quiz so it will at least work with the HotPot module now.

I have attached the fixed version of the quiz to this issue. Please compare it to the original version to see what and how I fixed it. If you do not have software for comparing two files, I suggest WinMerge or NotePad++ as good open-source possibilities.

Different browsers have different ways of dealing with invalid xhtml, which is why this quiz worked on some browsers and not on others. Firefox is not good at handling <font> tags, and there are many of these in the errors-1.htm quiz. Furthermore, some of them are unclosed (line 1042) and others are incorrectly placed (line 1812).

The Hot Potatoes quizzes produce strict xhtml files, in order to run on without problems on as many browsers as possible. Therefore please explain to your teachers that if they add extra html into the "instructions", "reading" or "feedback" or even "buttons" it must all conform to strict xhtml standards.

thanks
Gordon

Show
Gordon Bateson added a comment - I have fixed the html in the "instructions" and "reading" part of the quiz so it will at least work with the HotPot module now. I have attached the fixed version of the quiz to this issue. Please compare it to the original version to see what and how I fixed it. If you do not have software for comparing two files, I suggest WinMerge or NotePad++ as good open-source possibilities. Different browsers have different ways of dealing with invalid xhtml, which is why this quiz worked on some browsers and not on others. Firefox is not good at handling <font> tags, and there are many of these in the errors-1.htm quiz. Furthermore, some of them are unclosed (line 1042) and others are incorrectly placed (line 1812). The Hot Potatoes quizzes produce strict xhtml files, in order to run on without problems on as many browsers as possible. Therefore please explain to your teachers that if they add extra html into the "instructions", "reading" or "feedback" or even "buttons" it must all conform to strict xhtml standards. thanks Gordon
Hide
Gordon Bateson added a comment -

Uploaded a "fixed" version of the error-1.htm file

Show
Gordon Bateson added a comment - Uploaded a "fixed" version of the error-1.htm file
Hide
Paul Taylor added a comment -

Thanks again, I'll pass all of that on. He did say that he loaded some older versions of the quizzes in question as a test and they worked fine, so he was aware of his own pilot error in the end.

Show
Paul Taylor added a comment - Thanks again, I'll pass all of that on. He did say that he loaded some older versions of the quizzes in question as a test and they worked fine, so he was aware of his own pilot error in the end.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: