-
Improvement
-
Resolution: Fixed
-
Minor
-
2.3.2, 2.4
-
MOODLE_23_STABLE, MOODLE_24_STABLE
-
MOODLE_28_STABLE
-
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.