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

SCORM 2004 Data Model Validation Incorrect

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.3
    • 1.8.9, 1.9.5
    • SCORM
    • None
    • Debian Linux
    • MySQL
    • MOODLE_19_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE
    • Easy

    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

            piers Piers Harding
            pinkduck Peter Chamberlin
            Peter Chamberlin Peter Chamberlin
            Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              13/May/09