]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed a problem with TIMESPAN pattern matching
authorbobopinna <bobopinna>
Fri, 27 Oct 2006 08:04:15 +0000 (08:04 +0000)
committerbobopinna <bobopinna>
Fri, 27 Oct 2006 08:04:15 +0000 (08:04 +0000)
mod/scorm/datamodels/scorm_13.js.php

index a6b05693cad8db66a5de5cd3c7fede695ff2160b..fba8d11c3ce755acafec679e279c4728173c9a51 100644 (file)
@@ -28,7 +28,7 @@ function SCORMapi1_3() {
     CMIString64000 = '^.{0,64000}$';
     CMILang = '^([a-zA-Z]{2,3}|i|x)(\-[a-zA-Z0-9\-]{2,8})?$|^$';
     CMITime = '^(19[7-9]{1}[0-9]{1}|20[0-2]{1}[0-9]{1}|203[0-8]{1})((-(0[1-9]{1}|1[0-2]{1}))((-(0[1-9]{1}|[1-2]{1}[0-9]{1}|3[0-1]{1}))(T([0-1]{1}[0-9]{1}|2[0-3]{1})((:[0-5]{1}[0-9]{1})((:[0-5]{1}[0-9]{1})((\\.[0-9]{1,2})((Z|([+|-]([0-1]{1}[0-9]{1}|2[0-3]{1})))(:[0-5]{1}[0-9]{1})?)?)?)?)?)?)?)?$';
-    CMITimespan = '^P(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(\.\\d{1,2})?S)?)?$';
+    CMITimespan = '^P(\\d+Y)?(\\d+M)?(\\d+D)?(T(((\\d+H)(\\d+M)?(\\d+(\.\\d{1,2})?S)?)|((\\d+M)(\\d+(\.\\d{1,2})?S)?)|((\\d+(\.\\d{1,2})?S))))?$';
     CMIInteger = '^\\d+$';
     CMISInteger = '^-?([0-9]+)$';
     CMIDecimal = '^-?([0-9]{1,4})(\\.[0-9]{1,18})?$';
@@ -45,7 +45,7 @@ function SCORMapi1_3() {
     CMIResult = '^correct$|^incorrect$|^unanticipated$|^neutral$|^-?([0-9]{1,4})(\\.[0-9]{1,18})?$';
     NAVEvent = '^previous$|^continue$|^exit$|^exitAll$|^abandon$|^abandonAll$|^suspendAll$|^{target=\\S{0,200}[a-zA-Z0-9]}choice$';
     NAVBoolean = '^unknown$|^true$|^false$';
-    NAVTarget = '^previous$|^continue$|^{target=\\S{0,200}[a-zA-Z0-9]}$'
+    NAVTarget = '^previous$|^continue$|^choice.{target=\\S{0,200}[a-zA-Z0-9]}$'
     // Children lists
     cmi_children = '_version, comments_from_learner, comments_from_lms, completion_status, credit, entry, exit, interactions, launch_data, learner_id, learner_name, learner_preference, location, max_time_allowed, mode, objectives, progress_measure, scaled_passing_score, score, session_time, success_status, suspend_data, time_limit_action, total_time';
     comments_children = 'comment, timestamp, location';