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

SCORM datamodel CMIDecimal and CMIShortIdentifier are too restrictive

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 2.3
    • None
    • SCORM
    • MOODLE_23_STABLE

    Description

      CMIShortIdentifier should be a URI as defined in RFC 3986. The existing regexp in mod/scorm/datamodels/scorm_13.js.php is something weird that doesn't accept some valid URIs. The RFC provides a regular expression which can be used.

      CMIDecimal is defined in the SCORM 2004 spec to be a "real(10,7)", following ISO 11404, but recommends allowing as much precision as possible, so this changes the regexp to accept any number of digits.

      Is there a particular reason why the regular expressions are the way they are at the moment? I had a question whose answer was 100000, which the datamodel rejected. It shouldn't have, according to the SCORM spec.

      I've made a branch with less restrictive expressions for SCORM 2004 only at https://github.com/numbas/moodle/tree/SCORM-datatype-regexp.

      Attachments

        Issue Links

          Activity

            People

              danmarsden Dan Marsden
              christianp Christian Perfect
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: