Bookmark Cookie template

Use templates to standardize and re-use content functionality

Moderator: Nav

Bookmark Cookie template

Postby aprilsheninger » Thu Feb 03, 2011 8:40 am

Hi.

Is it possible to alter the Bookmark Cookie template to only bookmark particular pages in the lesson?

What my customer wants me to do is to encourage students to exit after a section of the module is complete. (I totally disagree with it, but I understand why they think they want it this way even though it's not entirely sound reasoning.) They want me to add a pop-up that explains if they exit before the last page of the "section", they will be required to redo/re-watch the section from the beginning. This pop-up would need to activate if they Exit the module and if they close their browser. I can handle the Exiting, but I am not sure about how to do the pop-up for closing the browser. Related, is there an easy way to stop the module from running while the pop-up is up? So if the student hits the Exit button or closes the browser, the animation and audio both stop until the student decides to Exit or goes back to finish the section. I keep telling them that this will annoy the students or they will just click through it anyway, but they aren't listening to me. At least I have convinced them to make the sections pretty small.

Right now, the template bookmarks each and every page. What I need to see happen is if the student exits at a page that is not the section's last page, the bookmark will be created for the beginning of the section that they are exiting early. As a backup for people who don't allow cookies or don't understand them, I will need to send info about their progress within the module to the database, so maybe the template can be modified to talk to the database?

Is there generally a better way to do what I need? In the most basic terms, I need to inform the students that they are about to exit without completing the section, then ask them where they want to start when they come back in and keep track of it for them. Sounds so simple, yet seems so complicated. Guidance is greatly appreciated.

Thank you,
April
aprilsheninger
 
Posts: 68
Joined: Tue Mar 18, 2008 8:51 am
Location: State College, Pa

Re: Bookmark Cookie template

Postby Nav » Thu Feb 03, 2011 3:00 pm

Hi April,
First off, there's no way that I know of to display the warning if they close the browser. Since the lesson is running in the browser, when you close it, the lesson will be closed. And unable to do anything. You might be able to add some JavaScript to the player.html or scorm.html file if you know how to do that, which might be a solution all around - http://www.devcurry.com/2009/01/alertpr ... osing.html (You want everything in [including] the script tags). I haven't confirmed that this works in all cases, but it seems to do the job.

If they click on a "close" button that you provide, you can have it pop up a display instead. And then if they click OK on that, then you can close the browser. So that would work. You could put the "close" button (which is really a "launch the popup that will tell you things and then give you a choice" button) and the popup on the Master Page.

However, I don't know how you will stop the animation/timeline/audio/video on the particular page. You could use Global Events, but that's going to be quite a bit of work to put 2 actions on each page to stop and play each timeline. You can mute it, but that's not the same thing.

As for how to bookmark only certain pages, what I would do is only update (save the bookmark) on certain pages - namely the first page of each new section. That way, when you enter the 3rd section, it is bookmarked, and will continue to be bookmarked until it is updated with the 4th section. Beware of them backtracking and then exiting, though. You might want to make sure that you don't update the bookmark if they are not on the latest page. For more on tracking the latest page, see the answer to your previous question here - viewtopic.php?f=4&t=573#p1586

Anyway, your action for selective saving would be on the Master Page and look like this (provided the new sections start on pages 5, 8, and 10):
Trigger: Page Controller > onPageChange
Condition: Page Controller > getPageIndex == 5
Condition: Page Controller > getPageIndex == 8 All connected with an OR
Condition: Page Controller > getPageIndex == 10
True Response: Cookie Object > setCookie > Function > Page Controller > getPageIndex [or however you are storing your action]
False Response: [blank]

And finally, if you're worried about cookies not being saved, and you're sure that the database approach is going to work, you might want to rely on that and only store your data on the database, as opposed to using cookies at all.

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: Bookmark Cookie template

Postby aprilsheninger » Fri Feb 04, 2011 8:32 am

Hi Nav,

OK. I think what you said makes sense to me, but when I tried it, nothing happens. I thought there might be other stuff that I needed to add that goes with what you told me to do to set the cookie and get the display to show that gives students a chance to either pick up where they left off or start again. I used the actions that were in the Template as a guide and rebuilt it. Still nothing happens. Doesn't matter how far into the module I go, it always says I left off on page 2 (Learning Objectives) and when I click the option to start where I left off on page 2, it starts me off from page 1 (Overview). Any ideas? If you want to look, the lesson is called "Alcohol10TestVersion".

The reason I am worried about cookies is because 14,000 students are going to use this course before they get to campus in August. So who knows what computer they will be on or which browser even. The chances of technical difficulties is higher only because there are so many people going to hitting the course. We'll have a detailed help page and explain that Cookies need to be enabled, but there are bound to be students who won't read that and will have trouble. Since this is required by the University(students are reported to Judicial Affairs if they don't complete it), I think that having a backup is prudent. So if I plan to skip using Cookies and use the database instead, I'd use a SendtoURL action to do that instead then?

If I wanted to use a Global Event to stop the animation and sound, what would that look like? I am pretty sure that I will need to do that. I am sure that I'll be asked if I can stop the animation.

Thank you.
April
aprilsheninger
 
Posts: 68
Joined: Tue Mar 18, 2008 8:51 am
Location: State College, Pa

Re: Bookmark Cookie template

Postby Nav » Wed Feb 09, 2011 6:21 pm

Hi April,
I'll take a look at your lesson and get back to you about your specific set up.

As for not using cookies, yes you can switch over and use the Server Communication Object instead. However, you need to have your server side script and your lesson on the same server in order for them to work. If the Server Communication object cannot get a response, it will completely hang your SmartBuilder lesson, so that always makes testing fun.

If you're going to use a Global Event, you can find out more about them here - http://help.smartbuilder.com/node/208 The only difference in that example is that the even is being fired on the regular page, and caught on the Master Page. In your example, you'll want to fire the event on the Master Page (when the close button is clicked) and caught on the regular page (pausing and playing the video).

However... If you want to be tricky, you can instead obscure everything when the popup message shows, and turn the volume all the way down (Page Controller > setAudioVolume = 0). Then if they hit cancel, hide the obscuring mask and reload the page. That way you don't have to create 2 conditional Global Event Actions on each and every single page! That would be horrible.

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: Bookmark Cookie template

Postby aprilsheninger » Thu Feb 17, 2011 7:03 am

Lots to think about. I'll try some things out and post back what we ended up doing.

Thanks you!
April
aprilsheninger
 
Posts: 68
Joined: Tue Mar 18, 2008 8:51 am
Location: State College, Pa


Return to Templates

Who is online

Users browsing this forum: No registered users and 3 guests

cron
Not able to open ./cache/data_global.php