Moodle
  1. Moodle
  2. MDL-25298

scorm track stores pseudo-html tags that may affect to information display

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.11, 2.0.1
    • Component/s: SCORM
    • Labels:
      None
    • Database:
      MySQL
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Rank:
      1362

      Description

      Maybe it's not a Moodle issue but some scorms store extra information at cmi.suspend_data as pseudo-html tags. If you check the scorm attempt details, Moodle shows the information without problem but if you try to get the same information through user profile >> activity report >> complete report happens the following (see attached image)

      A sample of the information stored at cmi.suspend_data:

      <SCO><visits>03</visits><objects/><objectives><o id=\"total\" desc=\"This is automatically created module objective.\" module=\"yes\" cs=\"c\" ss=\"u\" max=\"100\" min=\"0\" raw=\"100\" scaled=\"1\"><s id=\"\" raw=\"100\"/></o></objectives><interactions/></SCO>

      As you can see, the problem is that there's a s tag which has not closing tag, so the browser represents the rest of the lines as strikethrough text.

      The problem can be fixed modifiying mod/scorm/lib.php, function scorm_user_complete() , line 335

      $report .= '<li>'.$element.' => '.$value.'</li>';

      turns into

      $report .= '<li>'.$element.' => '.s($value).'</li>';

      That prevents the browser to translate the possible html code stored in extra scorm fields.

        Activity

        Hide
        Dan Marsden added a comment -

        fixing component - thanks for the report - will take a closer look at this later.

        Show
        Dan Marsden added a comment - fixing component - thanks for the report - will take a closer look at this later.
        Hide
        Dan Marsden added a comment -

        fix now in 1.9STABLE and HEAD - thanks for the report/fix

        Show
        Dan Marsden added a comment - fix now in 1.9STABLE and HEAD - thanks for the report/fix

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: