Issue Details (XML | Word | Printable)

Key: MDL-16727
Type: Bug Bug
Status: Resolved Resolved
Resolution: Not a bug
Priority: Minor Minor
Assignee: Dan Marsden
Reporter: Peter Chamberlin
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

SCORM Activity Redirection wait

Created: 29/Sep/08 09:05 PM   Updated: 30/Sep/08 05:09 PM
Component/s: SCORM
Affects Version/s: 1.9.1, 1.9.2
Fix Version/s: None

Environment: Debian Linux, Apache

Database: MySQL
Participants: Dan Marsden and Peter Chamberlin
Security Level: None
Resolved date: 30/Sep/08
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
Currently the following is displayed prior to loading each SCORM module:

You will be redirected to this activity in... 2 seconds
You will be redirected to this activity in... 1 seconds
You will be redirected to this activity in... 0 seconds
Activity loading, please wait...

There wasn't a 3-second wait before version 1.9.1, so why introduce it?

The singular of seconds should be used, i.e. "1 second"

Why show "0 seconds" at all? Surely redirect at that point?

I ask that this seemingly unnecessary load delay be removed, bypassed or explained.



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Dan Marsden added a comment - 30/Sep/08 04:45 AM
Hi Peter,

the 3 second delay has been there for a long time(definitely pre 1.9.1) it's just that this wasn't communicated well to the user - it just showed a blank page until the SCORM loaded, and some users would refresh a few times causing other issues. - It just provides feedback to the user that it is loading and to be patient.

this delay is needed to allow all the api stuff to load correctly in all browsers before loading the scorm object. - without the delay, many scorm objects just won't play, as the browser hasn't loaded all it needs.

see MDL-14492 for more info on the timer thingy.


Peter Chamberlin added a comment - 30/Sep/08 04:17 PM
Rather than a fixed timeout wouldn't it be better to make the SCORM instantiation dependent on the creation of the API object?

For example, API.php writes out "var API = new SCORMapi1_2();" near its final lines, so the SCO href change could be made then or on a window.setTimeout() callback. Thus a single line warning about load delay could be shown (easier to translate) and the wait time reduced to the bare minimum.

Alternatively a combination of window.onload events and a script load counter could be used to trigger the page transfer earlier from a higher point in the window chain once the necessary dependants have been loaded into the script host.

Particularly where there are multiple SCO assets within a package it gets quite tedious to wait for so long during content navigation, by which point the scripts are likely to have been cached in the browser session in any case.

Could you at least reduce the 3-second wait back to the 2-second one you had before? The JS code written by loadSCO.php could be adjusted to use the condition "if (cSeconds > 1)" instead of "if( cSeconds )"


Dan Marsden added a comment - 30/Sep/08 05:09 PM
we couldn't just reduce the limit from 3 seconds to 2 as it just isn't enough for IE to ALWAYS work. - there were a range of issues in the tracker and in the forums related to this - increasing to 3 seconds has reduced the amount of tracker items and forum posts we've had to deal with!

but.... we could look at improving it to be more intelligent - feel free to submit a patch and we'll review it - otherwise we might look at this at a later date.

thanks,

Dan