Moodle
  1. Moodle
  2. MDL-5041

SCORM Module, SCORM 2004 : RegExp

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: None
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      Windows XP
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_16_STABLE
    • Rank:
      11311

      Description

      Some of the RegExp defined in http://moodle.cvs.sourceforge.net/moodle/moodle/mod/scorm/datamodels/scorm1_3.js.php are false :

      ----------------------------------------------

      CMITime = '^([0-2]

      {1}[0-9]{1}

      )[0-5]

      {1}[0-9]{1}

      )[0-5]

      {1}[0-9]{1}

      )(\.[0-9]

      {1,2})?$';

      --> one backslash are missing, it should be :

      CMITime = '^([0-2]{1}[0-9]{1})[0-5]{1}[0-9]{1})[0-5]{1}[0-9]{1})(
      .[0-9]{1,2}

      )?$';

      Therefore, the ADL specification explain that you can pass this type of data : 2003-07-25T03:00:00. Today this RegExp doesn't validate it, il only validate 03:00:00

      ----------------------------------------------

      ----------------------------------------------

      --> some backslash are missing, it should be :

      CMITimespan = '^P(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(\\.
      d

      {1,2})?S)?)?$';

      ----------------------------------------------



      ----------------------------------------------

      --> some backslash are missing, it should be :

      CMIDecimal = '^-?([0-9]{0,3})(
      .[0-9]{1,7})?$';

      ----------------------------------------------



      ----------------------------------------------

      --> some backslash are missing, it should be :

      CMIResult = 'correct$/^wrong$/^unanticipated$/^neutral$/([0-9]{0,3})?(
      .[0-9]{1,2}

      )?$';

      ----------------------------------------------

        Activity

        Imported created issue -
        Hide
        Michael Blake added a comment -

        assign to a valid user

        Show
        Michael Blake added a comment - assign to a valid user
        Michael Blake made changes -
        Field Original Value New Value
        Assignee Roberto Pinna [ robertopinna ] Roberto Pinna [ upo ]
        Martin Dougiamas made changes -
        Workflow jira [ 15722 ] MDL Workflow [ 52107 ]
        Martin Dougiamas made changes -
        Workflow MDL Workflow [ 52107 ] MDL Full Workflow [ 81220 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: