Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-41695

Moodle is too restrictive with scores format for SCORM 1.2 interoperability

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.6, 2.4.3, 2.4.7, 2.5.3, 2.6
    • Fix Version/s: 2.4.8, 2.5.4, 2.6.1
    • Component/s: SCORM
    • Labels:
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      Turn the SCORM debugger on and enter a SCORM (any valid scorm is fine)
      Debugging: http://docs.moodle.org/en/SCORM_FAQ#Debugging

      In the debugger window select the Data Model Element "cmi.core.score.raw"
      then try setting any decimal value from 0 to 100 like 0.1, 1.5, 1.7777777 by entering the value into the "value to Set" field and pressing LMSSetValue() button - make sure any decimal value between 0 and 100 returns lines like this in the debugger:

      Fri, 08 Nov 2013 01:13:01 GMT: LMSSetValue("cmi.core.score.raw", "1.4") => 0
      Fri, 08 Nov 2013 01:13:01 GMT: LMSGetErrorString("0", "No error") => 0
      

      Try entering text/values outside that range (include text and negative numbers) and it should give the following errors in the debugger:

      Fri, 08 Nov 2013 01:14:56 GMT: LMSSetValue("cmi.core.score.raw", "NaN") => 405
      Fri, 08 Nov 2013 01:14:56 GMT: LMSGetErrorString("405", "Incorrect data type") => 0
      

      Now perform the same tasks with the Data model element 'cmi.interactions.n.weighting' - it includes the ability to have negative numbers with the range -100 to 100 - try entering values between that range and make sure the debugger doesn't show any errors. Then enter values outside that range and make sure it returns some errors.

      Show
      Turn the SCORM debugger on and enter a SCORM (any valid scorm is fine) Debugging: http://docs.moodle.org/en/SCORM_FAQ#Debugging In the debugger window select the Data Model Element "cmi.core.score.raw" then try setting any decimal value from 0 to 100 like 0.1, 1.5, 1.7777777 by entering the value into the "value to Set" field and pressing LMSSetValue() button - make sure any decimal value between 0 and 100 returns lines like this in the debugger: Fri, 08 Nov 2013 01:13:01 GMT: LMSSetValue("cmi.core.score.raw", "1.4") => 0 Fri, 08 Nov 2013 01:13:01 GMT: LMSGetErrorString("0", "No error") => 0 Try entering text/values outside that range (include text and negative numbers) and it should give the following errors in the debugger: Fri, 08 Nov 2013 01:14:56 GMT: LMSSetValue("cmi.core.score.raw", "NaN") => 405 Fri, 08 Nov 2013 01:14:56 GMT: LMSGetErrorString("405", "Incorrect data type") => 0 Now perform the same tasks with the Data model element 'cmi.interactions.n.weighting' - it includes the ability to have negative numbers with the range -100 to 100 - try entering values between that range and make sure the debugger doesn't show any errors. Then enter values outside that range and make sure it returns some errors.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull Master Branch:
      master_MDL-41695

      Description

      Moodle is too restrictive regarding CMIDecimal format?
      It allows only 2 digits on the right of the decimal point.
      So communication between the SCO and moodle fails if the SCO tries to set a value of a score with more than 2 digits.
      Wtih the SCORM debugger:
      OK : LMSSetValue("cmi.core.score.raw", "12.34") => 0
      KO : LMSSetValue("cmi.core.score.raw", "12.345") => 405
      This issue is due to the regular expression defining CMIDecimal format in scorm_12.js.php which is too restrictive and non conformant with the SCORM 1.2 / AICC (CMI001) specifications: 255 characters, positive or negative, decimal.
      The regular expression could be replaced as following?
      !http://www.nohhao.com/Capture.PNG!

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    13/Jan/14