When a user logs out instead of clicking "Exit Activity" on a SCORM activity, the user gets an error. Traced in the SCORM API debugging log it looks like this:
Expected behavior when user logs out without exiting activity?
Re: Expected behavior when user logs out without exiting activity?
Hi,
we observe the same issue with several packages, including the demos from the ADL website. Looks like there's no mechanism to signal the RT that the user is logging off. Hence the JS runs on and fails lacking a session. Moodle 2.2.2 btw.
Am I missing anything or is this really normal behaviour?
Best
Stefan
Re: Expected behavior when user logs out without exiting activity?
you can probably help to prevent the users from doing it by using the setting to open the SCORM in a new window - it's possibly more likely the users will close the window which should trigger LMSFinish() as expected.
feel free to create a new bug in the tracker for it although unless it gets a large number of votes or someone funds my time to fix it I'm likely to spend time on other tasks first and this will probably sit for a while.
Re: Expected behavior when user logs out without exiting activity?
Sorry for the necro post, but this is the google result for the problem and I've found a solution that works for us.
In the theme's config.php file, adjust the incourse array from:
'incourse' => array(
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
),
to
'incourse' => array(
'file' => 'general.php',
'options' => array('nologinlinks'=>true),
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre',
),
i.e. add the options array (or add nologinlinks to the existing array if you have one)
This will remove the "(Log out)" link in the header and footer of the page while in a course, so the student can't log out without exiting the activity and hence don't generate the error where the javascript is attempting to write to a closed connection.