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

SCORM 2004 Data Model Validation Incorrect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.3
    • Fix Version/s: 1.8.9, 1.9.5
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      Debian Linux
    • Database:
      MySQL
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      In /mod/scorm/datamodels/scorm_13.js.php there are the following regular expressions defined for validating data model string values:

      var CMIString200 = '^.

      {0,200}$';
      var CMIString250 = '^.{0,250}$';
      var CMIString1000 = '^.{0,1500}$';
      var CMIString4000 = '^.{0,4000}$';
      var CMIString64000 = '^.{0,64000}$';

      The dot in a regular expression matches any character EXCEPT a newline (unless newline inclusion is enabled as an option of the regular expression engine used).

      The SCORM 2004 3rd Edition standard requires characters from ISO 10646 (basis of Unicode Standard), thus the regex patterns should be:

      var CMIString200 = '^\\u0000-\\uFFFF{0,200}

      $';
      var CMIString250 = '^\\u0000-\\uFFFF

      {0,250}

      $';
      var CMIString1000 = '^\\u0000-\\uFFFF

      {0,1500}

      $'; // Why is this 1,500 instead of 1,000?
      var CMIString4000 = '^\\u0000-\\uFFFF

      {0,4000}

      $';
      var CMIString64000 = '^\\u0000-\\uFFFF

      {0,64000}

      $';

        Attachments

          Activity

            People

            Assignee:
            piers Piers Harding
            Reporter:
            pinkduck Peter Chamberlin
            Tester:
            Peter Chamberlin
            Participants:
            Component watchers:
            Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/May/09