Details
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}$';
Thanks Peter - Piers would you mind having a look at this one? - Peter helped out with the regex stuff for SCORM 1.2 in
MDL-12872a while back.Peter - there is a lot of work to be done in the SCORM 2004 stuff - feel free to create lots more tracker issues with any inconsistencies! - We don't currently have any funding to keep working through it, but issues like this with small fixes are trivial for us to patch.
thanks!
MDL-12872a while back. Peter - there is a lot of work to be done in the SCORM 2004 stuff - feel free to create lots more tracker issues with any inconsistencies! - We don't currently have any funding to keep working through it, but issues like this with small fixes are trivial for us to patch. thanks!