-
Bug
-
Resolution: Fixed
-
Minor
-
2.2.1, 2.3
-
MOODLE_22_STABLE, MOODLE_23_STABLE
-
MOODLE_22_STABLE
-
master_
MDL-30578 -
We need to fix the regex expression for CMIIdentifier and CMILongIdentifier.
The current allows - empty string - "" as a valid identifier and does not return a 406 erorr - which should not be the case, causing the following errors in Activity 1 DMI -
ERROR: Evaluating SetValue("cmi.objectives.1.id", "") - Expected: "false" - LMS Returned: "true"
ERROR: Evaluating GetLastError("") - Expected: "406" - LMS Returned: "0"
Evaluating GetValue("cmi.objectives.1.id") - Expected: "" - LMS Returned: ""
ERROR: Evaluating GetLastError("") - Expected: "301" - LMS Returned: "0"
ERROR: Evaluating SetValue("cmi.objectives.1.id", "MYID01") - Expected: "true" - LMS Returned: "false"
ERROR: Evaluating GetLastError("") - Expected: "0" - LMS Returned: "351"
ERROR: Evaluating GetValue("cmi.objectives.1.id") - Expected: "MYID01" - LMS Returned: ""
Evaluating GetLastError("") - Expected: "0" - LMS Returned: "0"
ERROR: Evaluating SetValue("cmi.objectives.2.id", "MYID01") - Expected: "false" - LMS Returned: "true"
ERROR: Evaluating GetLastError("") - Expected: "351" - LMS Returned: "0"
ERROR: Evaluating GetValue("cmi.objectives.2.id") - Expected: "" - LMS Returned: "MYID01"
ERROR: Evaluating GetLastError("") - Expected: "301" - LMS Returned: "0"
ERROR: Evaluating GetValue("cmi.objectives.2.id") - Expected: "" - LMS Returned: "MYID01"
ERROR: Evaluating GetLastError("") - Expected: "301" - LMS Returned: "0"
We need to check for the string value when creating cmi.< >.n.id as per the format for a valid URI (RFC 3986 [6]) and URN syntax as per RFC 2141 [3] and return a 406 error code if the value is not in the proper format.
It says in particular -
1. The string should not contain all white spaces (and should not be an empty string).
2. If the string starts with "urn:" it should have the full format like - "urn:something:SomethingOrSomethingElse"
3. If it does not contain "urn:" at the start of string, then the string can contain any printable characters without any whitespace.
- will help resolve
-
MDL-28805 ADL TEST: DMI
- Closed