Can I alert scorm user that connection is lost?

Can I alert scorm user that connection is lost?

by Gino Bartali -
Number of replies: 5

Hi,

I have courses with Scorm activities that are long 1 hour. If a user looses temporarily his internet connection or if the moodle session is timeout, then the scorm activity continues normally, but the tracking data are not saved on moodle database because the connection between moodle and scorm is lost. In fact, the user can conclude the scorm activity, but the activity is not completed and it restarts from the page before the connection lost. The user doesn't know that the connection was lost and he discovers that the activity is not completed only at the end of it!

Is it possible to alert the user when the connection between moodle and scorm is lost? 

I did some tests and I see that when the connection is lost, the LMSCommit is errorcode 101, as you can see below:

Here the SCORM API Activity Log

Tue, 11 Aug 2015 09:53:58 GMT: Moodle SCORM 1.2 API Loaded, Activity: Modulo 2, SCO: item
Tue, 11 Aug 2015 09:53:59 GMT: LMSInitialize("", "") => 0
Tue, 11 Aug 2015 09:53:59 GMT: LMSGetValue("cmi.suspend_data") - N4IgJiBcCsCMCc8DMAGANCANlATBgblANrqxo4C6GADlKPgJYCmA7gCICuATgIYAuDAPYA7KHHgZMPAM58AasxZMwAZUwMwTXBmnrNKvvybS6IFKcbSGfZVD5cOTDAGNBAW2qYmNiJABmPJjSTAC+GLAWDFY+dg5OIK4eXjH+gcFhIDiR0baQ9o4u7p7euQFBoSEZAI50lUAAA== => 0
Tue, 11 Aug 2015 09:54:06 GMT: LMSSetValue("cmi.core.session_time", "00:00:00") => 0
Tue, 11 Aug 2015 09:54:06 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCsCMCc8DMB2ANCANlATBgblANoAMasaOAuhgA5SiYCGAzgC4BqAlgKYDuPMAGVMXMD1wFefACIBXAE5M2XAPYA7KHHgYWo8ULbKeLBiBJn8XFlzaCobBXJ4YAxqoC2tTDzsRIAGZMmCw8AL4YsJbWtvaQjs5unt6+cUEh4Rg40TZ+Dk4uIO5ePnmBwaFhVRgAjgxVQAA") => 0
Tue, 11 Aug 2015 09:54:14 GMT: LMSSetValue("cmi.core.session_time", "00:00:07") => 0
Tue, 11 Aug 2015 09:54:14 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCsBMDs8AcA2ANCANlWGBuUA2gAxoCMasAuhgA5SiYCGAzgC4BqAlgKYDuPMAGVMXMDxz5efACIBXAE5M2XAPYA7KPAwtR4oW2U8WDEMVN4uLLm0FQ2CuTwwBjVQFtamHrYiQAZkyYLDwAvhhkFlY2dpAOTq4eXj6xgcFhGLBR1r72js4gbp7euQFBIaGVGACODJVAA==") => 0
Tue, 11 Aug 2015 09:54:14 GMT: LMSSetValue("cmi.core.score.min", "0") => 0
Tue, 11 Aug 2015 09:54:14 GMT: LMSSetValue("cmi.core.score.max", "100") => 0
Tue, 11 Aug 2015 09:54:14 GMT: LMSSetValue("cmi.core.score.raw", "4.48") => 0
Tue, 11 Aug 2015 09:54:14 GMT: LMSSetValue("cmi.core.lesson_status", "failed") => 0
Tue, 11 Aug 2015 09:54:14 GMT: LMSSetValue("cmi.core.session_time", "00:00:07") => 0
Tue, 11 Aug 2015 09:54:14 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCsBMDsBOADADgDQgDZVpgblANrLoCM6sAupgA5ShYCGAzgC4BqAlgKYDuPMAGUsXMD1wFefACIBXAE5M2XAPYA7KPEwtR4oW2U8WDEMlP4uLLm0FQ2CuT0wBjVQFtaWHrYiQAZkxYLDwAvphkFlY2dpAOTq4eXj6xgcFhmLBR1r72js4gbp7euQFBIaGVmACODJVAA==") => 0
Tue, 11 Aug 2015 09:54:15 GMT: Commit("", "") => 0
Tue, 11 Aug 2015 09:54:15 GMT: LMSCommit("AJAXResult", "true") => 0
Tue, 11 Aug 2015 09:54:15 GMT: LMSCommit("result", "true") => 0
Tue, 11 Aug 2015 09:54:15 GMT: LMSCommit("errorCode", "0") => 0
Tue, 11 Aug 2015 09:54:31 GMT: LMSSetValue("cmi.core.session_time", "00:00:24") => 0
Tue, 11 Aug 2015 09:54:31 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCsAssCYAM0A0IA2UHoG5QG0lUBGVBAXXQAcpQMBDAZwBcA1ASwFMB3LsAMoYOYLtjzceAEQCuAJwYsOAewB22AMzomw0QJaKuTOiCQncHJhxb8oLOTK7oAxsoC21DFxsRIAMwYMJi4AX3QSc0trW0h7Rxd3T28YgKDQ9ARIqx87BycQVw8vHP9A4JCK9ABHOgqgAAA==") => 0
Tue, 11 Aug 2015 09:54:46 GMT: LMSSetValue("cmi.core.session_time", "00:00:39") => 0
Tue, 11 Aug 2015 09:54:46 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCs0JwA4DMAmANCANldIBuUA2gAxoCMaKAuhgA5SiYCGAzgC4BqAlgKYDuPMAGVMXMDxwY8vPgBEArgCcmbLgHsAdlCRwMLUeKFsVPFgxDFz0llzaCobRfJ4YAxmoC2tTDzsRIAGZMmCw8AL4YZFZcNn4OTi4g7l4+cYHBoREgKNGx9pCOzm6e3r75QSHhYVkAjgzVQAA") => 0
Tue, 11 Aug 2015 09:54:47 GMT: LMSSetValue("cmi.core.session_time", "00:00:40") => 0
Tue, 11 Aug 2015 09:54:47 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCsBsAMskBoQBsoCZUDcoG15kBGZTAXVQAcpQ0BDAZwBcA1ASwFMB3TsAZTTswnLLi7cAIgFcATvWbsA9gDsoAZgCcqRkJH9mCzo1oh4pnO0btmfKM1nTOqAMZKAtlTSdbESADN6NEZOAF9UYgsrGztIBydXDy8fWMDgsNRMKOtfe0dnEDdPb1yAoJDwkHVsmL94gqLk0rSK0MqAR1o2oAA==") => 0
Tue, 11 Aug 2015 09:54:47 GMT: LMSSetValue("cmi.core.session_time", "00:00:40") => 0
Tue, 11 Aug 2015 09:54:47 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCsBsAMB2JAaEAbKAmNA3KA2vCgIwpYC6aADlKOgIYDOALgGoCWApgO5dgBldBzBcoAZjzceAEQCuAJwYsOAewB2EgJxomw0QJbKuTOiHhncHJhxb8oLBXK5oAxqoC21dFzsRIAGYM6ExcAL5oJJbWtvaQjs5unt6+cUEh4WhY0TZ+Dk4uIO5ePnmBwaERIOI5sf4JhcUpZemVYVUAjnTtQAA") => 0
Tue, 11 Aug 2015 09:54:47 GMT: LMSSetValue("cmi.core.score.min", "0") => 0
Tue, 11 Aug 2015 09:54:47 GMT: LMSSetValue("cmi.core.score.max", "100") => 0
Tue, 11 Aug 2015 09:54:47 GMT: LMSSetValue("cmi.core.score.raw", "5.97") => 0
Tue, 11 Aug 2015 09:54:47 GMT: LMSSetValue("cmi.core.lesson_status", "failed") => 0
Tue, 11 Aug 2015 09:54:47 GMT: LMSSetValue("cmi.core.session_time", "00:00:40") => 0
Tue, 11 Aug 2015 09:54:47 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCsBsAMAOesA0IA2UDM6BuUA2vKgIyoBMq2AuugA5SgYCGAzgC4BqAlgKYB3PmADKGHmD458/AQBEArgCcWHHgHsAdjgCc6NuMkiOqvmyYh4FvDzY8OwqByUK+6AMbqAtvQx8HEJAAZiwYbHwAvuik1rb2jpDOrh7evv4JIWGR6BSxdgFOLm4gnj5+BcGh4VEg2HnxgUnFpWkVmdURNQCOTJ1AAA=") => 0
Tue, 11 Aug 2015 09:54:47 GMT: Commit("", "") => 0
Tue, 11 Aug 2015 09:54:48 GMT: LMSCommit("AJAXResult", "true") => 0
Tue, 11 Aug 2015 09:54:48 GMT: LMSCommit("result", "true") => 0
Tue, 11 Aug 2015 09:54:48 GMT: LMSCommit("errorCode", "0") => 0
Tue, 11 Aug 2015 09:55:03 GMT: LMSSetValue("cmi.core.session_time", "00:00:56") => 0
Tue, 11 Aug 2015 09:55:03 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCsDsBsAmaAGANCANlAzBgblANroCMaiaOAuhgA5SiYCGAzgC4BqAlgKYDuvMAGVM3ML1wE+/ACIBXAE7N23APYA7KNGgZWYicPYrerRiBTn83Vt3ZCo7RfN4YAxmoC2dTL3sRIADNmTFZeAF8MUisbOwdIJxd3Lx8/eODQiIxEGNt/R2dXEA9vX3ygkLDIkBxcuIDEopLU8oyq8OqAR0YOoA") => 0
Tue, 11 Aug 2015 09:55:18 GMT: LMSSetValue("cmi.core.session_time", "00:01:12") => 0
Tue, 11 Aug 2015 09:55:18 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCsCcCMsAc8A0IA2UDM6BuUA2gAypoBMq2AuugA5SgYCGAzgC4BqAlgKYDuvMAGUM3MLxz4+/ACIBXAE7N23APYA7KAHY0IVmInD2K3q0YhiFvN1bd2QqO0Xze6AMZqAtnQy8HEJAAZswYrLwAvujw1rb2jpDOrh7evv4JIWGR6OSxdgFOLm4gnj5+BcGh4VEg2HnxgUnFpWkVmdURNQCOjJ1AAA=") => 0
Tue, 11 Aug 2015 09:55:34 GMT: LMSSetValue("cmi.core.session_time", "00:01:27") => 0
Tue, 11 Aug 2015 09:55:34 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcBsAMDsBOAjAJgDQgDZQMyYDcoBtWdZdDXAXUwAcpQsBDAZwBcA1ASwFMB3XmADKWbmF55CffgBEArgCdm7bgHsAdlAAc8TKzETh7Fb1aMQsCwW6tu7IVHaL5vTAGM1AWzpZeDiEgAM2YsVl4AX0xka1t7R0hnVw9vX38EkLDIzFRYuwCnFzcQTx8/AuDQ8KiQXDz4wKTi0rSKzOqImoBHRk6gAA=") => 0
...*** HERE THE SESSION IS TIMEOUT ***...
Tue, 11 Aug 2015 14:51:56 GMT: LMSSetValue("cmi.core.session_time", "04:57:50") => 0
Tue, 11 Aug 2015 14:51:57 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCMAcDMsCcSBs8A0IA2UAsWAblANoAMG0GATBpngLpYAOUo2AhgM4AuAagEsApgHchYAMrYBYIVACsRYSIAiAVwBOHHgID2AOyjQA7LFRIsXabIk9tQrmxBknhAVwE9xUHhrVCsAGNdAFtmbCEvCEgAMw5sLiEAXyxoV3dPb0hffyDQ8MisuITkrGp0jyifPwCQYLCIqtj4xJSQeArM6Jza+oKm4tasPE6mnryGwujB0pB5UazxuvzGopbkpLaARzZNoAAA==") => 0
Tue, 11 Aug 2015 14:51:57 GMT: LMSSetValue("cmi.core.score.min", "0") => 0
Tue, 11 Aug 2015 14:51:57 GMT: LMSSetValue("cmi.core.score.max", "100") => 0
Tue, 11 Aug 2015 14:51:57 GMT: LMSSetValue("cmi.core.score.raw", "8.96") => 0
Tue, 11 Aug 2015 14:51:58 GMT: LMSSetValue("cmi.core.lesson_status", "failed") => 0
Tue, 11 Aug 2015 14:51:58 GMT: LMSSetValue("cmi.core.session_time", "04:57:51") => 0
Tue, 11 Aug 2015 14:51:58 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCMAcDMBOaBWFA2ANCANlF2AblANoAMm0mATJvJgCyYoC62ADlKDgIYDOAFwBqASwCmAdzFgAyjhFgx+IuIkARAK4AnHgJEB7AHZRoAdljpE2PvMUyBusXy4gyLwiL4iB0qAK0aYtgAxvoAtuw4Yj4QkABmPDh8YgC+2NDunt6+kP6BIeGR0TkJSanY1JleMX4BQSChEVE18YnJaSDwVdmxefWNRS2l7dgM3S19BU3FscPlICjjOZMNhc0lbakpHQCOXNtAAA") => 0
Tue, 11 Aug 2015 14:52:00 GMT: Commit("", "") => 0
Tue, 11 Aug 2015 14:52:00 GMT: LMSCommit("AJAXResult", " ") => 0
Tue, 11 Aug 2015 14:52:00 GMT: LMSCommit("result", "false") => 0
Tue, 11 Aug 2015 14:52:00 GMT: LMSCommit("errorCode", "101") => 0
Tue, 11 Aug 2015 14:52:16 GMT: LMSSetValue("cmi.core.session_time", "04:58:09") => 0
Tue, 11 Aug 2015 14:52:16 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCMAcAsAGAnPATLANCANlArNgG5QDaim0mamAzJvJvgLrYAOUoOAhgM4AuANQCWAUwDuosAGUcwsKILEx4gCIBXAE7d+wgPYA7KNADssc9l5yF0/jtG9OIRE6LDew/lKj9N60dgAxnoAtmw4ol4QkABm3Di8ogC+2NCu7p7ekL7+QaHhkVlxCcnYaOkeUT5+ASDBYRFVsfGJKSC0FZnRObX1BU3FrdjwnU09eQ2F0YOlIPijWeN1+Y1FLclJbQCOnJtAAAA==") => 0
Tue, 11 Aug 2015 14:52:25 GMT: LMSSetValue("cmi.core.session_time", "04:58:18") => 0
Tue, 11 Aug 2015 14:52:25 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCMAcAscBsAmWAaEAbKBWTAblANoAM606K6AzOvOrgLqYAOUoWAhgM4AuANQCWAUwDuIsAGUsQsCLyFRYgCIBXAE5c+QgPYA7KNADssAJzHMPWfKl9tInhxClnBITyF9JUPhrUimADGugC2rFgi3hCQAGZcWDwiAL6Y0G4eXj6QfgHBYRFR2fGJKZgoGZ7Rvv6BICHhkdVxCUmpIDSVWTG5dQ2FzSVtmPBdzb35jUUxQ2UguGPZE/UFTcWtc0iLPbWTA+ulyUeYAI4cR0AAA=") => 0
Tue, 11 Aug 2015 14:52:26 GMT: LMSSetValue("cmi.core.session_time", "04:58:19") => 0
Tue, 11 Aug 2015 14:52:26 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCMAcAs0CccAMAaEAbKBWTAblANobToBM6AzOvOrgLqYAOUoWAhgM4AuAagEsApgHdhYAMpZBYYVABshEaIAiAVwBOnXoID2AOyjQA7LCQnM3GXMm8dw7uxCpnBQd0G8JUXpvXCmADGegC2LFjC3hCQAGacWNzCAL6Y0G4eXj6QfgHBYRFR2fGJKZgUGZ7Rvv6BICHhkdVxCUmpINSVWTG5dQ2FzSVtmPBdzb35jUUxQ2UguGPZE/UFTcWtcwqLPbWTA+ulyUeYAI7sR0AAA=") => 0
Tue, 11 Aug 2015 14:52:26 GMT: LMSSetValue("cmi.core.score.min", "0") => 0
Tue, 11 Aug 2015 14:52:26 GMT: LMSSetValue("cmi.core.score.max", "100") => 0
Tue, 11 Aug 2015 14:52:27 GMT: LMSSetValue("cmi.core.score.raw", "10.45") => 0
Tue, 11 Aug 2015 14:52:27 GMT: LMSSetValue("cmi.core.lesson_status", "failed") => 0
Tue, 11 Aug 2015 14:52:27 GMT: LMSSetValue("cmi.core.session_time", "04:58:20") => 0
Tue, 11 Aug 2015 14:52:27 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCMAcAsAmADAdlsgNCANlAbNgG5QDaW0mimAzJvJgKyb4C62ADlKDgIYDOAFwBqASwCmAd3FgAyjlFhxBYhMkARAK4AnXoNEB7AHZRo6AJyps/BUtmC94/txDIXRUf1GCZUQds1xbABjAwBbDhxxHwhIADNeHH5xAF9saHdPb19If0CQ8MjonISk1OxETK8YvwCgkFCIqJr4xOS0kBoq7Ni8+sailtL27Hhulr6CpuLY4fKQRnGcyYbC5pK2+fwl3rqpwY2ylOPsAEduY6AA=") => 0
Tue, 11 Aug 2015 14:52:29 GMT: Commit("", "") => 0
Tue, 11 Aug 2015 14:52:29 GMT: LMSCommit("AJAXResult", " ") => 0
Tue, 11 Aug 2015 14:52:29 GMT: LMSCommit("result", "false") => 0
Tue, 11 Aug 2015 14:52:29 GMT: LMSCommit("errorCode", "101") => 0
Tue, 11 Aug 2015 14:52:44 GMT: LMSSetValue("cmi.core.session_time", "04:58:38") => 0
Tue, 11 Aug 2015 14:52:45 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCMAcAsBmWAGA7NANCANlAbNgG5QDaKmWATJopvJgKyb4C62ADlKDgIYDOAFwBqASwCmAd3FgAyjlFhxBYhMkARAK4AnXoNEB7AHZRoaAJxns/BUtmC94/txAoXRUf1GCZUQds1xbABjAwBbDhxxHwhIADNeHH5xAF9saHdPb19If0CQ8MjonISk1OwqTK8YvwCgkFCIqJr4xOS0kEQq7Ni8+sailtL27Hhulr6CpuLY4fKQRnGcyYbC5pK2+fwl3rqpwY2ylOPsAEduY6AA=") => 0
Tue, 11 Aug 2015 14:53:01 GMT: LMSSetValue("cmi.core.session_time", "04:58:54") => 0
Tue, 11 Aug 2015 14:53:01 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCMAcAsBWeAmAbLANCANlN2AblANoAMm0mKmAzJvJopmgLrYAOUoOAhgM4AXAGoBLAKYB3cWADKOUWHH4iEyQBEArgCdeg0QHsAdlGgB2AJy1GIfgqWzBe8f24gybwqP6jBMqILamuLYAMYGALYcOOJ+EJAAZrw4/OIAvtjQnt6+/pCBwWGR0bF5SSnp2CjZPnEBQSEg4VExdYnJqRkgtDW58QWNzSVt5Z3Y8L1tA0UtpfGjlSCIk3nTTcWtZR2LaCv9DTPDWxVpp9gAjtynQAA==") => 0
Tue, 11 Aug 2015 14:53:11 GMT: LMSSetValue("cmi.core.session_time", "04:59:05") => 0
Tue, 11 Aug 2015 14:53:12 GMT: LMSSetValue("cmi.suspend_data", "N4IgJiBcCMAcAsA2ArNATNANCANlR2AblANoAMmWamAzJvJspogLrYAOUoOAhgM4AXAGoBLAKYB3MWADKOEWDH4i4iQBEArgCceAkQHsAdlGgB2AJzwGIPvMUyBusXy4gyrwiL4iB0qAK0NMWwAY30AW3YcMV8ISAAzHhw+MQBfbGgPLx8/SACg0IiomNzE5LTsNCzvWP9A4JAwyOjahKSU9JAaapy4/Iam4tayjux4Htb+wuaSuJGKkGQJ3KnGopbS9oXEZb766aHN8tST7ABHLhOgAAA==") => 0
Tue, 11 Aug 2015 14:53:12 GMT: LMSSetValue("cmi.core.exit", "suspend") => 0
Tue, 11 Aug 2015 14:53:13 GMT: LMSFinish("AJAXResult", " ") => 0
Tue, 11 Aug 2015 14:53:14 GMT: LMSFinish("result", "false") => 0
Tue, 11 Aug 2015 14:53:14 GMT: LMSFinish("", "") => 0


I woud like that if LMSCommit("errorCode", "101") then I alert the user with a javascript popup that he must logout and reconnect to moodle.

How can I catch the errorCode 101? 

Should I modify a moodle file (which one?) or a scorm package file?

I use Scorm 1.2 developed with iSpringPro and moodle 2.3.4.


Thank you for your help!


Average of ratings: -
In reply to Gino Bartali

Re: Can I alert scorm user that connection is lost?

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Moodle 2.3.4 contains a number of known security issues that could allow a malicious user to seriously compromise your site. You should upgrade to a more recent stable supported release.


Since Moodle 2.7 SCORM includes an internet connection script which runs in the background and notifies the user if communication with the server has been lost. There is also a new auto-commit setting which will  automatically save any SCORM data even if the SCORM package doesn't call Finish() or Commit()

Checking to see if the user is still logged in is a bit more difficult because any regular/automated process that touches the user session can result in the session staying alive permanently which then becomes a security issue.

Average of ratings: Useful (2)
In reply to Dan Marsden

Re: Can I alert scorm user that connection is lost?

by Gino Bartali -

Hi Dan,

I followed your advice and I installed a new server with Moodle 2.7.9, but I don't resolve the problem.

I did this simple test:

- I started a scorm activity

- at the same time, I opened another moodle page in a new browser page

- from this second page I logout and then login with the same user

- in the first page I can normally play scorm activity, but in reality the connection between moodle site and scorm is down, and the tracking data are not saved. In fact, if I go out and then come back to scorm activity, the completion is not saved and I have to restart scorm again! There is no notification that connection is down and there is no auto-commit of scorm activity. Maybe have I to set up any option? I don't find auto-commit or similars in scorm configurations.

This is the scorm log during this test:

Wed, 12 Aug 2015 19:30:17 GMT: Moodle SCORM 1.2 API Loaded, Activity: Modulo 1 - DEFINIZIONI, SCO: Modulo_1_-_DEFINIZIONI_SCO
Wed, 12 Aug 2015 19:30:17 GMT: Moodle SCORM 1.2 API Loaded, Activity: Modulo 1 - DEFINIZIONI, SCO: Modulo_1_-_DEFINIZIONI_SCO
Wed, 12 Aug 2015 19:30:18 GMT: LMSInitialize("", "") => 0
Wed, 12 Aug 2015 19:30:18 GMT: LMSGetValue("cmi.core.lesson_mode") - normal => 0
Wed, 12 Aug 2015 19:30:18 GMT: LMSGetValue("cmi.core.lesson_mode") - normal => 0
Wed, 12 Aug 2015 19:30:18 GMT: LMSGetValue("cmi.core.lesson_status") - not attempted => 0
Wed, 12 Aug 2015 19:30:18 GMT: LMSSetValue("cmi.core.lesson_status", "incomplete") => 0
Wed, 12 Aug 2015 19:30:18 GMT: LMSSetValue("cmi.core.exit", "suspend") => 0
Wed, 12 Aug 2015 19:30:19 GMT: LMSSetValue("cmi.core.session_time", "0000:00:01.24") => 0
Wed, 12 Aug 2015 19:30:20 GMT: Commit("", "") => 0
Wed, 12 Aug 2015 19:30:20 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 12 Aug 2015 19:30:20 GMT: LMSCommit("result", "true") => 0
Wed, 12 Aug 2015 19:30:20 GMT: LMSCommit("errorCode", "0") => 0
Wed, 12 Aug 2015 19:30:20 GMT: LMSGetValue("cmi.suspend_data") - => 0
Wed, 12 Aug 2015 19:30:20 GMT: LMSGetValue("cmi.core.lesson_status") - incomplete => 0
Wed, 12 Aug 2015 19:30:23 GMT: LMSSetValue("cmi.core.lesson_status", "incomplete") => 0
Wed, 12 Aug 2015 19:30:23 GMT: LMSSetValue("cmi.suspend_data", "") => 0
Wed, 12 Aug 2015 19:30:23 GMT: LMSSetValue("cmi.core.session_time", "0000:00:04.97") => 0
Wed, 12 Aug 2015 19:30:23 GMT: Commit("", "") => 0
Wed, 12 Aug 2015 19:30:23 GMT: LMSCommit("AJAXResult", "true") => 0
Wed, 12 Aug 2015 19:30:23 GMT: LMSCommit("result", "true") => 0
Wed, 12 Aug 2015 19:30:23 GMT: LMSCommit("errorCode", "0") => 0
Wed, 12 Aug 2015 19:30:39 GMT: LMSSetValue("cmi.suspend_data", "2y144050ji1001111a010110111100~231j03cb3a141414141000000000000000000000000000000000000000000000000000") => 0
Wed, 12 Aug 2015 19:30:47 GMT: LMSSetValue("cmi.suspend_data", "2426406050on1001211f01011011110121100~2u1j03cb3a1414141410000r03q$1i141414147kz0O6_$140000000000000000000000000000000000000000000000000") => 0
Wed, 12 Aug 2015 19:31:24 GMT: LMSSetValue("cmi.suspend_data", "2u26406050ts1001111k0101101111012110111100~2P1j03cb3a1414141410000r03q$1i141414147kz0O6_$14000l03r09c141414141410000000000000000000000000000000000000000000000000") => 0
Wed, 12 Aug 2015 19:31:26 GMT: LMSSetValue("cmi.suspend_data", "2v2840706050yx1001311p010110111101211011110131100~2J1j03cb3a1414141410000l03bw2c141414141414000l03r09c141414141410000000000000000000000000000000000000000000000000") => 0
Wed, 12 Aug 2015 19:32:27 GMT: LMSSetValue("cmi.suspend_data", "2X2a4070605080DC1001411u01011011110121101111013110141100~222j03cb3a1414141410000l03bw2c141414141414000l03r09c141414141410000l03IJec14141414141000000000000000000000000000000000000000000000000") => 0
Wed, 12 Aug 2015 19:32:42 GMT: LMSSetValue("cmi.suspend_data", "2n3c40706050a080IH1001611z0101101111012110111101311014110161100~2n2j03cb3a1414141410000l03bw2c141414141414000l03r09c141414141410000l03IJec141414141410000l039J2c1414141414140000000000000000000000000000000000000000000000") => 0
Wed, 12 Aug 2015 19:33:43 GMT: LMSSetValue("cmi.suspend_data", "2P3e40706050a0b080NM1001711E010110111101211011110131101411016110171100~2I2j03cb3a1414141410000l03bw2c141414141414000l03r09c141414141410000l03IJec141414141410000l039J2c1414141414140000l03uJec14141414141000000000000000000000000000000000000000000000") => 0
Wed, 12 Aug 2015 19:33:49 GMT: LMSSetValue("cmi.core.session_time", "0000:03:31.42") => 0
Wed, 12 Aug 2015 19:33:49 GMT: LMSSetValue("cmi.core.exit", "suspend") => 0
Wed, 12 Aug 2015 19:33:50 GMT: Commit("", "") => 0
Wed, 12 Aug 2015 19:33:50 GMT: LMSCommit("AJAXResult", "") => 0
Wed, 12 Aug 2015 19:33:50 GMT: LMSCommit("result", "false") => 0
Wed, 12 Aug 2015 19:33:50 GMT: LMSCommit("errorCode", "101") => 0
Wed, 12 Aug 2015 19:33:50 GMT: LMSGetErrorString("101", "General exception") => 0
Wed, 12 Aug 2015 19:33:50 GMT: LMSGetDiagnostic("101", "101") => 0

Wed, 12 Aug 2015 19:33:50 GMT: LMSFinish("AJAXResult", "") => 0
Wed, 12 Aug 2015 19:33:50 GMT: LMSFinish("result", "false") => 0
Wed, 12 Aug 2015 19:33:50 GMT: LMSFinish("", "") => 0
Wed, 12 Aug 2015 19:33:50 GMT: LMSGetErrorString("101", "General exception") => 0
Wed, 12 Aug 2015 19:33:50 GMT: LMSGetDiagnostic("101", "101") => 0

The LMSCommit doesn't work after that in the other browser page I logout and then login with the same user.

How do you manage connection down between moodle and scorm? My test is very trivial, but the same problem occurs if the session is timeout or if iPad looses the internet connection for few seconds...

I think that notifying immediately that connection is down (when LMSCommit is errorCode 101) could avoid to play all scorm activity and finally realize that completion tracking is lost and have to restart again...

Thank you again for your help!



In reply to Gino Bartali

Re: Can I alert scorm user that connection is lost?

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Gino,
reading SCORM call error should fall under the Content responsibility: it's "your" content that should advice the user that something went wrong in saving the data.

You could argue that Moodle should send some/proper details about the error via LMSGetDiagnostic() but again it's Content responsibility to check for the error code and eventually show LMSGetDiagnostic() output to the user: from your logs it seems that "your" content is asking for that value. Does the content show that output too?

HTH,
Matteo

Average of ratings: Useful (1)
In reply to Matteo Scaramuccia

Re: Can I alert scorm user that connection is lost?

by Luis de Vasconcelos -

Is there something that can be added to the scorm package to make it retry the call to the LMS a few times when the inital call fails, e.g. when the user is on a slow conection or the site is very busy?

In reply to Luis de Vasconcelos

Re: Can I alert scorm user that connection is lost?

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Luis,
if the data the content is sending is vital, yes it is possible: you can refactor the code in the content to let the SCORM calls be accumulated and then flushed, including the management of the retry logic per any call or just per the LMSCommit/LMSFinish calls.

BTW I've never seen a content like that made by an off-the-shelf SCORM Authoring Tool.

HTH,
Matteo

Average of ratings: Useful (1)