Moodle
  1. Moodle
  2. MDL-29159

Regression: HTML of currently launched/active SCO not rendering correctly in the TOC.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.2
    • Fix Version/s: 2.1.3
    • Component/s: SCORM
    • Labels:
    • Testing Instructions:
      Hide

      Install this SCORM:
      http://moodle.org/mod/data/view.php?d=50&rid=1655
      use default settings
      enter SCORM and view toc on left hand side - make sure text is displayed like this:
      Fruit Quizzes (Score: ) with an image on the left.
      not:
      <span title="a=302&scoid=1977&currentorg=Course001&attempt=1" class="ygtvlabel" id="ygtvlabelel2">& lt;img src="http://localhost/moodle-git/moodle/theme/image.php?theme=standard& amp;amp;image=notattempted& amp;amp;rev=217& amp;amp;component=scorm" alt="Not attempted" title="Not attempted"& gt;& amp;nbsp;LMS Test Suite - SCO 1& amp;nbsp;</span>

      Show
      Install this SCORM: http://moodle.org/mod/data/view.php?d=50&rid=1655 use default settings enter SCORM and view toc on left hand side - make sure text is displayed like this: Fruit Quizzes (Score: ) with an image on the left. not: <span title="a=302&scoid=1977&currentorg=Course001&attempt=1" class="ygtvlabel" id="ygtvlabelel2">& lt;img src="http://localhost/moodle-git/moodle/theme/image.php?theme=standard& amp;amp;image=notattempted& amp;amp;rev=217& amp;amp;component=scorm" alt="Not attempted" title="Not attempted"& gt;& amp;nbsp;LMS Test Suite - SCO 1& amp;nbsp;</span>
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull Master Branch:
      master_MDL-29159
    • Rank:
      18700

      Description

      The HTML rendered in the TOC for currently active/launched SCO is coming up something like this -

      <span title="a=302&scoid=1977&currentorg=Course001&attempt=1" class="ygtvlabel" id="ygtvlabelel2">& lt;img src="http://localhost/moodle-git/moodle/theme/image.php?theme=standard& amp;amp;image=notattempted& amp;amp;rev=217& amp;amp;component=scorm" alt="Not attempted" title="Not attempted"& gt;& amp;nbsp;LMS Test Suite - SCO 1& amp;nbsp;</span>

      You can find - & nbsp; & gt; & lt; in the HTML instead of > < etc.

      (remove white character between &_nbsp; etc.)

        Issue Links

          Activity

          Hide
          Mayank Gupta added a comment - - edited

          While digging in the code for YUI 2.9 - there is code to convert all HTML into text in an a tag. One solution is to load an earlier version of TreeView. 2.8.2 that does not have the 'fix'. The other option is to override getContentHtml method defined in class TextNode so as to strip all the calls to Lang.escapeHTML which is there in the current version. Overriding the method is a better option.

          Show
          Mayank Gupta added a comment - - edited While digging in the code for YUI 2.9 - there is code to convert all HTML into text in an a tag. One solution is to load an earlier version of TreeView. 2.8.2 that does not have the 'fix'. The other option is to override getContentHtml method defined in class TextNode so as to strip all the calls to Lang.escapeHTML which is there in the current version. Overriding the method is a better option.
          Hide
          Dan Marsden added a comment -

          interesting - have you checked out treeview in yui 3 to see if it's any different?

          Show
          Dan Marsden added a comment - interesting - have you checked out treeview in yui 3 to see if it's any different?
          Hide
          Mayank Gupta added a comment - - edited

          Yes, I checked out treeview in yui3. Its working fine in yui3 (as it works in treeview 2.8.2).

          Show
          Mayank Gupta added a comment - - edited Yes, I checked out treeview in yui3. Its working fine in yui3 (as it works in treeview 2.8.2).
          Hide
          Dennis Tobar added a comment -

          Is there any solution for this problem?. I don't see the same problem in other modules in Moodle. I just try with buildTreeFromMarkup method but fail too.

          Show
          Dennis Tobar added a comment - Is there any solution for this problem?. I don't see the same problem in other modules in Moodle. I just try with buildTreeFromMarkup method but fail too.
          Hide
          Artem Andreev added a comment -

          Solution with yui3 will be work until yahoo developers will not fix TextNode in yui3...

          Show
          Artem Andreev added a comment - Solution with yui3 will be work until yahoo developers will not fix TextNode in yui3...
          Hide
          Dan Marsden added a comment -

          If they decide to change in in YUI 3 as well we'll need to find another solution but my preference at this stage is to use the YUI 3 method as it doesn't appear to have the same problem and it's likely we'll want to update to YUI 3 anyway.

          Show
          Dan Marsden added a comment - If they decide to change in in YUI 3 as well we'll need to find another solution but my preference at this stage is to use the YUI 3 method as it doesn't appear to have the same problem and it's likely we'll want to update to YUI 3 anyway.
          Hide
          Artem Andreev added a comment -

          Dan, please add to affected branches 2.1. It may be necessary to increase the priority of bug because of it affects release branch?

          Show
          Artem Andreev added a comment - Dan, please add to affected branches 2.1. It may be necessary to increase the priority of bug because of it affects release branch?
          Hide
          Dan Marsden added a comment -

          yeah - good point - had forgotten this was in a stable branch - thanks for the reminder.

          Show
          Dan Marsden added a comment - yeah - good point - had forgotten this was in a stable branch - thanks for the reminder.
          Hide
          Andrea Bicciolo added a comment -

          Hi Dan,
          do you think it would be possible to increase priority and have an estimate for the resolution time as this issue is affecting stable branch thus many production sites as well?

          Show
          Andrea Bicciolo added a comment - Hi Dan, do you think it would be possible to increase priority and have an estimate for the resolution time as this issue is affecting stable branch thus many production sites as well?
          Hide
          Dan Marsden added a comment - - edited

          I've already increased priority to major and changed status 40min before your comment! - short term workaround is for people to backport Yui to the previous version.

          I just took a 5min look to try and change to yui3 but it didn't work straight away - might get a chance to look on the weekend if you're lucky.

          Show
          Dan Marsden added a comment - - edited I've already increased priority to major and changed status 40min before your comment! - short term workaround is for people to backport Yui to the previous version. I just took a 5min look to try and change to yui3 but it didn't work straight away - might get a chance to look on the weekend if you're lucky.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          I've tested this with some (previously reproducing the problem) packages deployed here, both under 2.1 and master, and, once applied, the TOC reappeared ok.

          So passing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - I've tested this with some (previously reproducing the problem) packages deployed here, both under 2.1 and master, and, once applied, the TOC reappeared ok. So passing, ciao
          Hide
          Dennis Tobar added a comment -

          Patch works ok.

          Show
          Dennis Tobar added a comment - Patch works ok.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Yes, you got this finally upstream, just in time for Moodle 2.2beta. Congrats and thanks!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Yes, you got this finally upstream, just in time for Moodle 2.2beta. Congrats and thanks! Ciao
          Hide
          Badrul Nazri Mohamad added a comment - - edited

          I think problem MDL-28937 reappears. I cannot navigate by clicking link in TOC. Navbar also not working properly.

          Show
          Badrul Nazri Mohamad added a comment - - edited I think problem MDL-28937 reappears. I cannot navigate by clicking link in TOC. Navbar also not working properly.
          Hide
          Dan Marsden added a comment -

          Hi Badrul - MDL-28937 refers to Sequencing and Navigation which is in SCORM 2004 - this bug affects 1.2/2004 and AICC objects and displays a link but in an invalid manner.

          NOTE: SCORM 2004 IS NOT OFFICIALLY SUPPORTED YET.

          If you have a SCORM 2004 package that uses seq/nav and prevents access to next/prev scos then the links in the toc will not be available - it will only display the text name of the SCO - this is expected/correct behaviour as per the SCORM 2004 specification.

          MDL-28937 is only a small part of the ADL 2004 CM-01 test (See MDL-28740 which is still open) - Sequencing and navigation support for SCORM 2004 packages is not yet complete - if you are using a SCORM 2004 package that implements seq/nav don't expect it to work - as SCORM 2004 is not yet officially supported in Moodle - see here for info on supported versions:
          http://docs.moodle.org/21/en/SCORM_FAQ#Supported_Versions

          And see MDL-7068 for our progress on support for SCORM 2004 (which shows that we have 191 ADL tests for SCORM 2004 compliance that are currently failing)

          More info on SCORM 2004 support is available on my blog:
          http://danmarsden.com/blog/category/scorm/

          Show
          Dan Marsden added a comment - Hi Badrul - MDL-28937 refers to Sequencing and Navigation which is in SCORM 2004 - this bug affects 1.2/2004 and AICC objects and displays a link but in an invalid manner. NOTE: SCORM 2004 IS NOT OFFICIALLY SUPPORTED YET. If you have a SCORM 2004 package that uses seq/nav and prevents access to next/prev scos then the links in the toc will not be available - it will only display the text name of the SCO - this is expected/correct behaviour as per the SCORM 2004 specification. MDL-28937 is only a small part of the ADL 2004 CM-01 test (See MDL-28740 which is still open) - Sequencing and navigation support for SCORM 2004 packages is not yet complete - if you are using a SCORM 2004 package that implements seq/nav don't expect it to work - as SCORM 2004 is not yet officially supported in Moodle - see here for info on supported versions: http://docs.moodle.org/21/en/SCORM_FAQ#Supported_Versions And see MDL-7068 for our progress on support for SCORM 2004 (which shows that we have 191 ADL tests for SCORM 2004 compliance that are currently failing) More info on SCORM 2004 support is available on my blog: http://danmarsden.com/blog/category/scorm/
          Hide
          Badrul Nazri Mohamad added a comment -

          Hi Dan,
          I'm using SCORM 1.2 packages on Moodle v2.1.3. TOC was working perfectly with release tagged v2.1.2, and still works if I switched to that branch with git.

          Show
          Badrul Nazri Mohamad added a comment - Hi Dan, I'm using SCORM 1.2 packages on Moodle v2.1.3. TOC was working perfectly with release tagged v2.1.2, and still works if I switched to that branch with git.
          Hide
          Dan Marsden added a comment -

          Can you provide a package that we can use that reproduces your issue?

          Show
          Dan Marsden added a comment - Can you provide a package that we can use that reproduces your issue?
          Hide
          Badrul Nazri Mohamad added a comment -

          It could be problem with my own moodle instance. I would appreciate it if you could look at this.
          http://dl.dropbox.com/u/31197154/Chap3_sample.zip

          Show
          Badrul Nazri Mohamad added a comment - It could be problem with my own moodle instance. I would appreciate it if you could look at this. http://dl.dropbox.com/u/31197154/Chap3_sample.zip
          Hide
          Dan Marsden added a comment -

          worked fine for me using FF - you could also try demo.moodle.net or qa.moodle.net to see if it works for you on those sites.

          Show
          Dan Marsden added a comment - worked fine for me using FF - you could also try demo.moodle.net or qa.moodle.net to see if it works for you on those sites.

            People

            • Votes:
              5 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: