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

PATCH - SCORM auto-commit

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 2.8
    • 2.3.2, 2.4
    • SCORM
    • MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_28_STABLE
    • Hide

      1. Turn on API debugging mode in scorm
      2. Add the scorm package attached to this issue
      3. Make sure auto commit is turned on in scorm package settings
      4. Open the package and navigate to a SCO.
      5. Stop navigation when you see "LMSSetValue" as the last function call in the debugger.
      6. Wait for 60 seconds, "LMSCommit" should be called automatically.

      Show
      1. Turn on API debugging mode in scorm 2. Add the scorm package attached to this issue 3. Make sure auto commit is turned on in scorm package settings 4. Open the package and navigate to a SCO. 5. Stop navigation when you see "LMSSetValue" as the last function call in the debugger. 6. Wait for 60 seconds, "LMSCommit" should be called automatically.

    Description

      This patch helps ensure that data sent from a SCORM package, via SetValue(), is eventually stored in the database so that student progress data isn't lost. It will be Commit()ed within 60 seconds, in case the network connection is lost, the browser crashes, etc. before the SCORM object explicitly commit()s it.

      Some SCORM packages don't explicitly call Commit() regularly for whatever reason. This patch will Commit() the data 60 seconds afer the values are set, unless the package Commit()s sooner.

      It calls commit only if the client (SCO) hasn't already done so explicitly, and calls it only once per 60 seconds even if many values are pending, and doesn't call it at all if no values are pending.

      I am attaching a patch against 2.4 for Master and for the convenience of those who wish to backport it, a patch based against 2.3.2 is also attached.

      See also:
      https://moodle.org/mod/forum/discuss.php?d=219054

      Attachments

        Issue Links

          Activity

            People

              nobelium vignesh p
              raymor Ray Morris
              Dan Marsden Dan Marsden
              Dan Poltawski Dan Poltawski
              Ankit Agarwal Ankit Agarwal
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Nov/14