Does anyone know of a trick for the SCORM to open a URL when the Moodle player window has been closed?
I tried using a javascript to "listen" (Trigger: Execute JavaScript) when the player closes and open a new window (URL), but it was a no go. The window closes as usual but it won't open a new window. I also only need to do this on the last slide.
The learner can close the player via "Exit" button, ESC key or the X on the Moodle player.
Hi there, Todd! The only way that I could get that function to work (without dabbling in JavaScript) is by having a button on the slide with a trigger first to jump to a URL, and then a second trigger to close the course. It worked in a web and SCORM environment. That's probably limiting your learners, though, who would "X" out of the course window.
Javascript is the only real way. I'd suggest you focus your web search down to the "onunload" event, though hooking won't be easy, especially under Moodle. Deferred binding isn't quite easy for most new to javascript
7 Replies
Hi there, Todd! The only way that I could get that function to work (without dabbling in JavaScript) is by having a button on the slide with a trigger first to jump to a URL, and then a second trigger to close the course. It worked in a web and SCORM environment. That's probably limiting your learners, though, who would "X" out of the course window.
Hopefully some community members can chime in!
Perhaps this example will help you.
On the master slide, there is a trigger to exit the course when the user presses the esc key.
On the last slide of the course, there is a javascript function that listens for the window on before unload event and will open a new url.
Sorry, my example doesn't seem to work online. It worked locally in IE.
Thanks Russell. It didn't work on my end either. Will continue to search. If I find a way, I will share.
Thanks Crystal. That's where I was stuck. The trigger works as expected, hence the exploration of javascript.
Javascript is the only real way. I'd suggest you focus your web search down to the "onunload" event, though hooking won't be easy, especially under Moodle. Deferred binding isn't quite easy for most new to javascript
That's where I started.
This discussion is closed. You can start a new discussion or contact Articulate Support.