Moodle
  1. Moodle
  2. MDL-18756

SCORM 2004 - not loading all tracking data elements

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.4
    • Fix Version/s: 2.0
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      Tester platform is currently Windows Vista.
    • Database:
      MySQL
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      The problem was detected because no data was readed into cmi.suspend_data when in SCORM 1.3 mode (but it was well loaded in SCORM 1.2), and the LMS returned correctly error 403 (value not initialized), but the data was in the table of the database (mdl_scorm_scoes_track) and was valid, but was not loaded.

      I really don't understand the if() at line 39 of /mod/scorm/api.php, but this is exactly the place to start the fix.

      I made a fast solution so I can test if that behavior was or not an error of mine:

      Insert into /mod/scorm/api.php at line 44:

      foreach ($usertrack as $key => $value)

      { $userdata->$key = addslashes_js($value); }

      This code ensures that all the data comes where it should be!

      All the data was read ok from database, but the if() says that it should be dropped and I don't understand what are you trying to do in that case.

      I really hope that it can help you to fix the error!

      Thanks a lot!

        Gliffy Diagrams

        1. api.php
          3 kB
          Andres Melguizo Velez

          Issue Links

            Activity

            Hide
            Dan Marsden added a comment -

            thanks for the report - SCORM 2004 isn't complete in Moodle and has a range of bugs - we are currently attempting to source funding that would allow us to spend focused time on it.

            Show
            Dan Marsden added a comment - thanks for the report - SCORM 2004 isn't complete in Moodle and has a range of bugs - we are currently attempting to source funding that would allow us to spend focused time on it.
            Hide
            Josh added a comment -

            The if statement that you refer to looks close to right to me. From the scorm 2004 spec:


            If the cmi.exit is set to "suspend" then the SCOs current learner attempt does
            not end. The SCOs Run-Time Environment data model element values for the
            current learner session will be available to the SCO if the SCO is relaunched in a
            subsequent learner session.

            If the cmi.exit is set to "normal", "logout","time-out" or "" (empty
            characterstring) then the SCOs learner attempt ends. The SCOs Run-Time
            Environment data model element values of the current learner session will NOT
            be available if the SCO is relaunched.


            The SCO is responsible for setting the value of cmi.exit.

            Show
            Josh added a comment - The if statement that you refer to looks close to right to me. From the scorm 2004 spec: If the cmi.exit is set to "suspend" then the SCOs current learner attempt does not end. The SCOs Run-Time Environment data model element values for the current learner session will be available to the SCO if the SCO is relaunched in a subsequent learner session. If the cmi.exit is set to "normal", "logout","time-out" or "" (empty characterstring) then the SCOs learner attempt ends. The SCOs Run-Time Environment data model element values of the current learner session will NOT be available if the SCO is relaunched. The SCO is responsible for setting the value of cmi.exit.
            Hide
            Dan Marsden added a comment -

            thanks for the update Josh - we're well aware that there are a large range of issues with SCORM 2004 in moodle - this blog post summarises our current position:
            http://danmarsden.com/blog/2009/05/23/scorm-2004-in-moodle/

            Show
            Dan Marsden added a comment - thanks for the update Josh - we're well aware that there are a large range of issues with SCORM 2004 in moodle - this blog post summarises our current position: http://danmarsden.com/blog/2009/05/23/scorm-2004-in-moodle/
            Hide
            Dan Marsden added a comment -

            setting correct Priority - blockers are only used when they are planned to be fixed before the next release - they "block" the release from occurring until fixed.

            SCORM 2004 needs funding before work can progress.

            Show
            Dan Marsden added a comment - setting correct Priority - blockers are only used when they are planned to be fixed before the next release - they "block" the release from occurring until fixed. SCORM 2004 needs funding before work can progress.
            Hide
            Dan Marsden added a comment -

            updating title - SCORM 2004 work still requires funding - for more info please see: http://danmarsden.com/blog/2009/05/23/scorm-2004-in-moodle/

            Show
            Dan Marsden added a comment - updating title - SCORM 2004 work still requires funding - for more info please see: http://danmarsden.com/blog/2009/05/23/scorm-2004-in-moodle/
            Hide
            Dan Marsden added a comment -

            finally had a chance to look at this and actually read the comments - Jake is 100% correct - the if statement is "close to right" - in your case it's expected behaviour - if you want to reload previous datamodel elements on re-launch you should set cmi.exit to "suspend"

            so - for the reported issue - I should probably close this as "not a bug" - as it's expected behaviour... but in reading the comments (and reviewing the code) - it's clear that the code in Moodle wasn't quite correct - it's only ignoring previous datamodel elements if the cmi.exit was set to "time-out" - which is incorrect as Jake mentions above - it should also dump if cmi.exit is set to any of the other valid cmi.exit options - "normal", "logout","time-out" or "" I have updated the code in Moodle 2.0 to only return data if cmi.exit is set to "suspend" - so flagging this as fixed as the reported bug allowed discovery of a real issue.

            thanks to Jake for the comments above!

            Show
            Dan Marsden added a comment - finally had a chance to look at this and actually read the comments - Jake is 100% correct - the if statement is "close to right" - in your case it's expected behaviour - if you want to reload previous datamodel elements on re-launch you should set cmi.exit to "suspend" so - for the reported issue - I should probably close this as "not a bug" - as it's expected behaviour... but in reading the comments (and reviewing the code) - it's clear that the code in Moodle wasn't quite correct - it's only ignoring previous datamodel elements if the cmi.exit was set to "time-out" - which is incorrect as Jake mentions above - it should also dump if cmi.exit is set to any of the other valid cmi.exit options - "normal", "logout","time-out" or "" I have updated the code in Moodle 2.0 to only return data if cmi.exit is set to "suspend" - so flagging this as fixed as the reported bug allowed discovery of a real issue. thanks to Jake for the comments above!

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: