From 0d7eb69164e87c2e0dcaac864b492fdf4e829790 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Fri, 8 Nov 2013 13:51:39 +1300 Subject: [PATCH] MDL-41695 SCORM: allow unlimited decimal places in CMIDecimal --- mod/scorm/datamodels/scorm_12.js.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/scorm/datamodels/scorm_12.js.php b/mod/scorm/datamodels/scorm_12.js.php index e143dcf67b5..9ce5d1df249 100644 --- a/mod/scorm/datamodels/scorm_12.js.php +++ b/mod/scorm/datamodels/scorm_12.js.php @@ -42,7 +42,7 @@ function SCORMapi1_2() { CMITimespan = '^([0-9]{2,4}):([0-9]{2}):([0-9]{2})(\.[0-9]{1,2})?$'; CMIInteger = '^\\d+$'; CMISInteger = '^-?([0-9]+)$'; - CMIDecimal = '^-?([0-9]{0,3})(\.[0-9]{1,2})?$'; + CMIDecimal = '^-?([0-9]{0,3})(\.[0-9]*)?$'; CMIIdentifier = '^[\\u0021-\\u007E]{0,255}$'; CMIFeedback = CMIString256; // This must be redefined CMIIndex = '[._](\\d+).'; @@ -51,7 +51,7 @@ function SCORMapi1_2() { CMIStatus2 = '^passed$|^completed$|^failed$|^incomplete$|^browsed$|^not attempted$'; CMIExit = '^time-out$|^suspend$|^logout$|^$'; CMIType = '^true-false$|^choice$|^fill-in$|^matching$|^performance$|^sequencing$|^likert$|^numeric$'; - CMIResult = '^correct$|^wrong$|^unanticipated$|^neutral$|^([0-9]{0,3})?(\.[0-9]{1,2})?$'; + CMIResult = '^correct$|^wrong$|^unanticipated$|^neutral$|^([0-9]{0,3})?(\.[0-9]*)?$'; NAVEvent = '^previous$|^continue$'; // Children lists cmi_children = 'core,suspend_data,launch_data,comments,objectives,student_data,student_preference,interactions';