Skip to content
Browse files

MDL-30578, Updating CMILongIdentifer to check for valid URI (RFC 3986…

… [6]) and URN syntax as per RFC 2141 [3]
  • Loading branch information...
1 parent d8488e2 commit 4bc60a5b80acb05e30a6bdae9ff5fd01a9a041f8 @mayankgupta mayankgupta committed with kordan Dec 5, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/scorm/datamodels/scorm_13.js.php
View
4 mod/scorm/datamodels/scorm_13.js.php
@@ -90,9 +90,9 @@ function SCORMapi1_3() {
var CMIInteger = '^\\d+$';
var CMISInteger = '^-?([0-9]+)$';
var CMIDecimal = '^-?([0-9]{1,5})(\\.[0-9]{1,18})?$';
- var CMIIdentifier = '^\\S{0,250}[a-zA-Z0-9]$';
+ var CMIIdentifier = '^\\S{1,250}[a-zA-Z0-9]$';
var CMIShortIdentifier = '^[\\w\.]{1,250}$';
- var CMILongIdentifier = '^\\S{0,4000}$';
+ var CMILongIdentifier = '^(?:(?!urn:)\\S{1,4000}|urn:[a-z0-9][-a-z-0-9]{1,31}:\\S{1,4000})$';
var CMIFeedback = '^.*$'; // This must be redefined
var CMIIndex = '[._](\\d+).';
var CMIIndexStore = '.N(\\d+).';

0 comments on commit 4bc60a5

Please sign in to comment.
Something went wrong with that request. Please try again.