Moodle
  1. Moodle
  2. MDL-30624

Multimedia filters don't work in Quiz in moodle 2.2

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.2
    • Fix Version/s: STABLE backlog
    • Component/s: Filters
    • Environment:
      Serveur mutualisé linux (mavenhosting) version MySql 5.0.92-community-log | Version Apache 2.2.19 | Version PHP 5.3.6 |
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_22_STABLE
    • Rank:
      33433

      Description

      When using the moodle media button in the editor, the player appears in the visualisation, but when I save, only a link to the file appears. It affects audio and video files as well as youtube.

        Activity

        Hide
        Michael de Raadt added a comment -

        Hi. Do you have the multi-media filter enabled?

        Show
        Michael de Raadt added a comment - Hi. Do you have the multi-media filter enabled?
        Hide
        Franck Petit added a comment -

        Yes, will all filters set to 'yes'. It used to work but stopped after an upgrade.

        Show
        Franck Petit added a comment - Yes, will all filters set to 'yes'. It used to work but stopped after an upgrade.
        Hide
        Michael de Raadt added a comment -

        I tested this and was able to see the native media player when I was adding the file and the flow player in the rendered page.

        If you are seeing something different, perhaps you could provide some replication steps and screenshots.

        You might also like to test this on qa.moodle.net to see if you get the same result.

        Show
        Michael de Raadt added a comment - I tested this and was able to see the native media player when I was adding the file and the flow player in the rendered page. If you are seeing something different, perhaps you could provide some replication steps and screenshots. You might also like to test this on qa.moodle.net to see if you get the same result.
        Hide
        Franck Petit added a comment -

        I can only get hyperlinks on my site. I can give you an admin account and a sandbox course if you want to see by yourself.

        Show
        Franck Petit added a comment - I can only get hyperlinks on my site. I can give you an admin account and a sandbox course if you want to see by yourself.
        Hide
        Michael de Raadt added a comment -

        Hi, Franck.

        I shouldn't need admin access to your site.

        Can you tell me a series of exact steps that could be followed to demonstrate the problem you are having? Could you try running these steps on qa.moodle.net?

        Show
        Michael de Raadt added a comment - Hi, Franck. I shouldn't need admin access to your site. Can you tell me a series of exact steps that could be followed to demonstrate the problem you are having? Could you try running these steps on qa.moodle.net?
        Hide
        Franck Petit added a comment -

        Hi Michael,
        I: Steps resulting in this issue
        Step 1: having an up and running moodle 2.0 website. Mutimedia filters on. Mp3 files and videos embeded with players in ressources and activities (labels, description questions in quizes for instance)
        Step 2: Upgrade regularly. At some point with 2.1, all the players disappear and the files appear as links.
        Step 3: Hoping that this would be solved with 2.2, new upgrade, but with no improvements. Any multimedia file inserted with the editor using the moodlemedia button appears as a link with no player.

        II: Reproducing the issue on qa.moodle.net: would love it but it works there.

        III: Hypothesis: I've tried a lot of non-core pluggins (only those with no hack to the code) I'll set up a test site in an other directory and then will try to see one after the other if these affect the multimedia filters

        Cheers, Franck

        Show
        Franck Petit added a comment - Hi Michael, I: Steps resulting in this issue Step 1: having an up and running moodle 2.0 website. Mutimedia filters on. Mp3 files and videos embeded with players in ressources and activities (labels, description questions in quizes for instance) Step 2: Upgrade regularly. At some point with 2.1, all the players disappear and the files appear as links. Step 3: Hoping that this would be solved with 2.2, new upgrade, but with no improvements. Any multimedia file inserted with the editor using the moodlemedia button appears as a link with no player. II: Reproducing the issue on qa.moodle.net: would love it but it works there. III: Hypothesis: I've tried a lot of non-core pluggins (only those with no hack to the code) I'll set up a test site in an other directory and then will try to see one after the other if these affect the multimedia filters Cheers, Franck
        Hide
        Franck Petit added a comment -

        Hi,
        I did as I said: set up a test site in an other directory (same server): multimedia filters are working there. I tried to install the same pluggins than on my production site, and it didn't affect the multimedia filters.
        So, I have two sites with the same settings on the same server. In the first one multimedia filters are broken, in the other everything works fine. If I were not on a mahoodle install, I would transfer my courses in the new site, by I fear to jam my mahoodle sso and the handling of user accounts on mahara side.
        I don't get any php error message with debug on...
        Cheers, Franck

        Show
        Franck Petit added a comment - Hi, I did as I said: set up a test site in an other directory (same server): multimedia filters are working there. I tried to install the same pluggins than on my production site, and it didn't affect the multimedia filters. So, I have two sites with the same settings on the same server. In the first one multimedia filters are broken, in the other everything works fine. If I were not on a mahoodle install, I would transfer my courses in the new site, by I fear to jam my mahoodle sso and the handling of user accounts on mahara side. I don't get any php error message with debug on... Cheers, Franck
        Hide
        Mauno Korpelainen added a comment -

        Franck,

        when you said that all filters set to 'yes'... is the order of your filters in
        Site administration > Plugins > Filters > Manage filters
        the same on both sites?

        I started to wonder if some filter like "Convert URLs into links and images"-filter could change the content and/or break links of multimedia filter...or if you have different settings for "Convert URLs into links and images"-filter

        Just guessing

        Show
        Mauno Korpelainen added a comment - Franck, when you said that all filters set to 'yes'... is the order of your filters in Site administration > Plugins > Filters > Manage filters the same on both sites? I started to wonder if some filter like "Convert URLs into links and images"-filter could change the content and/or break links of multimedia filter...or if you have different settings for "Convert URLs into links and images"-filter Just guessing
        Hide
        Franck Petit added a comment -

        Dear Mauno,
        Your found the trick! Disabling 'html tidy filter' restored the multimedia filters instantaneously!
        Thank you so much!!!! I won't have to rebuild my all site!
        Cheers, Franck

        Show
        Franck Petit added a comment - Dear Mauno, Your found the trick! Disabling 'html tidy filter' restored the multimedia filters instantaneously! Thank you so much!!!! I won't have to rebuild my all site! Cheers, Franck
        Hide
        Simon Clegg added a comment -

        Hi there,

        We are having the same problem on 2.2.2 after upgrading from 2.0.5.
        Filter works in IE but not Firefox or Chrome. HTML Tidy filter is disabled.

        Cheers,

        S.C.

        Show
        Simon Clegg added a comment - Hi there, We are having the same problem on 2.2.2 after upgrading from 2.0.5. Filter works in IE but not Firefox or Chrome. HTML Tidy filter is disabled. Cheers, S.C.
        Hide
        Robert Russo added a comment -

        Same issue in 2.2.2 here. Gone through each filter and disabled everything except multimedia filters and still an issue.

        Show
        Robert Russo added a comment - Same issue in 2.2.2 here. Gone through each filter and disabled everything except multimedia filters and still an issue.
        Hide
        Eliz Tchakarian added a comment -

        I am having the same issue. Multimedia plugins are enabled and above Convert URLs into links and images. HTML tidy is off. Sometimes it works sometimes it doesn't. Please offer a fix for this. We will have a large amount of users using a great number of audios and we need a fix quickly. Thank you!

        Show
        Eliz Tchakarian added a comment - I am having the same issue. Multimedia plugins are enabled and above Convert URLs into links and images. HTML tidy is off. Sometimes it works sometimes it doesn't. Please offer a fix for this. We will have a large amount of users using a great number of audios and we need a fix quickly. Thank you!
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Can you confirm if disabling text caching fixes this and then the players are shown properly all the time?

        Admin -> Plugins -> Filters -> Common settings -> Text cache lifetime = "No"

        If you get them working with caching disabled... then it's possible this to be caused by the same problem commented @ MDL-32279 (for the glossary filter).

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Can you confirm if disabling text caching fixes this and then the players are shown properly all the time? Admin -> Plugins -> Filters -> Common settings -> Text cache lifetime = "No" If you get them working with caching disabled... then it's possible this to be caused by the same problem commented @ MDL-32279 (for the glossary filter). Ciao
        Hide
        Eliz Tchakarian added a comment -

        Hi Eloy,

        Yes, it worked one time. I have my entire site switched to using another audio player so I would not be able to tell you if it works all the time. So again, I think that's no guarantee that it would work all the time. The problem is that it works sometimes and sometimes it doesn't. Can anyone else test it for a longer period of time? I have also noticed that if you clear the HTML code entirely (delete everything) and then go back and upload the same audio it asks me to overwrite the previous one. When I overwrite it two audio bars appear of the same audio. Why? If it's been deleted it should be gone. Is there a way to fix that? Perhaps I'm doing something wrong?

        Thank you for you help!

        Show
        Eliz Tchakarian added a comment - Hi Eloy, Yes, it worked one time. I have my entire site switched to using another audio player so I would not be able to tell you if it works all the time. So again, I think that's no guarantee that it would work all the time. The problem is that it works sometimes and sometimes it doesn't. Can anyone else test it for a longer period of time? I have also noticed that if you clear the HTML code entirely (delete everything) and then go back and upload the same audio it asks me to overwrite the previous one. When I overwrite it two audio bars appear of the same audio. Why? If it's been deleted it should be gone. Is there a way to fix that? Perhaps I'm doing something wrong? Thank you for you help!
        Hide
        Chris Follin added a comment - - edited

        We are having this problem with clients and internal sites after upgrading to 2.2. (2.2.3 to be specific)

        I have reproduced it on a test site running straight MOODLE_22_STABLE. The branch is fully updated from git. There are absolutely no non-core plugins of any kind installed on this site. The Multimedia filter is the only filter enabled. See attached screenshot, mediaquestion_22.png, of a true/false quiz question that is displaying a link to the MP3 file. Clicking the link displays the full page media player but we should see the mini player on the quiz page.

        I cannot reproduce it on a test site running fully updated Moodle Master (again no non-core plugins and Multimedia is the only filter enabled). A true/false quiz question does display the mini player. See attached screenshot, mediaquestion_master.png.

        Setting Text Cache Lifetime to No had no effect on the situation in 22_STABLE. Since Multimedia is the only filter enabled, the problem also is not HTML Tidy in our case.

        Show
        Chris Follin added a comment - - edited We are having this problem with clients and internal sites after upgrading to 2.2. (2.2.3 to be specific) I have reproduced it on a test site running straight MOODLE_22_STABLE. The branch is fully updated from git. There are absolutely no non-core plugins of any kind installed on this site. The Multimedia filter is the only filter enabled. See attached screenshot, mediaquestion_22.png, of a true/false quiz question that is displaying a link to the MP3 file. Clicking the link displays the full page media player but we should see the mini player on the quiz page. I cannot reproduce it on a test site running fully updated Moodle Master (again no non-core plugins and Multimedia is the only filter enabled). A true/false quiz question does display the mini player. See attached screenshot, mediaquestion_master.png. Setting Text Cache Lifetime to No had no effect on the situation in 22_STABLE. Since Multimedia is the only filter enabled, the problem also is not HTML Tidy in our case.
        Hide
        Michael de Raadt added a comment -

        It would be good to know if this is still an issue. I know that there has been some work in this area.

        If this is still an issue, it would be good if we could get some clear replication steps.

        Show
        Michael de Raadt added a comment - It would be good to know if this is still an issue. I know that there has been some work in this area. If this is still an issue, it would be good if we could get some clear replication steps.
        Hide
        Chris Follin added a comment -

        Hi, Michael. We were able to reproduce this problem in the latest 2.2 as of July of this year. Now, I am not able to reproduce the problem in 2.3.3 or Master.

        Here are the steps in case anyone wants to test the current 22_STABLE:

        1. Create a quiz and add a question (I used T/F).
        2. Select Moodle Media from the HTML editor of the question text.
        3. Select and insert an MP3 file into the question text. Save.
        4. Attempt the quiz. The flowplayer will show for a very brief period but it will disappear and be replaced with hyperlinked text.

        Show
        Chris Follin added a comment - Hi, Michael. We were able to reproduce this problem in the latest 2.2 as of July of this year. Now, I am not able to reproduce the problem in 2.3.3 or Master. Here are the steps in case anyone wants to test the current 22_STABLE: 1. Create a quiz and add a question (I used T/F). 2. Select Moodle Media from the HTML editor of the question text. 3. Select and insert an MP3 file into the question text. Save. 4. Attempt the quiz. The flowplayer will show for a very brief period but it will disappear and be replaced with hyperlinked text.
        Hide
        Michael de Raadt added a comment -

        Thanks for that, Chris.

        So is this limited to Quiz?

        Show
        Michael de Raadt added a comment - Thanks for that, Chris. So is this limited to Quiz?
        Hide
        Chris Follin added a comment -

        Michael, I think so. It was only reported to us in quiz questions. In 2.2.3, I tried adding an MP3 file to a course topic description and to a forum activity description and both worked as expected.

        Show
        Chris Follin added a comment - Michael, I think so. It was only reported to us in quiz questions. In 2.2.3, I tried adding an MP3 file to a course topic description and to a forum activity description and both worked as expected.
        Hide
        Michael de Raadt added a comment -

        Thanks for the additional information, Chris.

        Tim: I'm not sure why this would only happen in Quiz, but perhaps you can have a look.

        Show
        Michael de Raadt added a comment - Thanks for the additional information, Chris. Tim: I'm not sure why this would only happen in Quiz, but perhaps you can have a look.
        Hide
        Tim Hunt added a comment -

        I vaguely remember something like this, but I cannot remember exactly what right now, and I am struggling to think of the right search terms.

        If is was a bug that got fixed, I cannot imagine why it was integrated into 2.3, but not 2.2.

        It is weird that flowplayer seems to appear briefly, and then disappear. That suggests that the right JS and embed code must be there, but is not working for some reason.

        I am adding Joseph Rezeau as a watcher, in case he can remember a problem like this. (I'm not quite sure why I think Joseph would know. It's just a hunch.)

        Show
        Tim Hunt added a comment - I vaguely remember something like this, but I cannot remember exactly what right now, and I am struggling to think of the right search terms. If is was a bug that got fixed, I cannot imagine why it was integrated into 2.3, but not 2.2. It is weird that flowplayer seems to appear briefly, and then disappear. That suggests that the right JS and embed code must be there, but is not working for some reason. I am adding Joseph Rezeau as a watcher, in case he can remember a problem like this. (I'm not quite sure why I think Joseph would know. It's just a hunch.)
        Hide
        Chris Follin added a comment -

        Michael and Tim, I retested this in the current 22_STABLE and could not reproduce the problem. Although I can't point to when, how, or in exactly which version it was fixed, it does seem to be fixed. I think this can be closed unless someone else is still having problems.

        Show
        Chris Follin added a comment - Michael and Tim, I retested this in the current 22_STABLE and could not reproduce the problem. Although I can't point to when, how, or in exactly which version it was fixed, it does seem to be fixed. I think this can be closed unless someone else is still having problems.
        Hide
        Tim Hunt added a comment -

        Thanks for re-testing.

        git log --grep qu --grep Black --oneline MOODLE_22_STABLE

        does not find anything that might have made a difference. How odd.

        Show
        Tim Hunt added a comment - Thanks for re-testing. git log --grep qu --grep Black --oneline MOODLE_22_STABLE does not find anything that might have made a difference. How odd.

          People

          • Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: