Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-25298

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

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9
    • 1.9.11, 2.0.1
    • SCORM
    • None
    • MySQL
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE, MOODLE_20_STABLE
    • Easy

    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.

      Attachments

        Activity

          People

            danmarsden Dan Marsden
            vilvoh Xavier Paz
            Nobody Nobody
            Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              25/Dec/10