If they are relaunching from the same system, you can use local storage to store and retrieve the value of the variable. That can be done either with JS or by using the powerful CpExtra widget (InfoSemantics - Australia).
Are you using an LMS? And do you have quiz tracking on? If so the LMS should store your Captivate vars and pass them back on resume.
If you are not, turn on Self-Paced learning in the TOC settings and that will enable Captivate to store the variables in the browser's cookies. Cookies are good until the user switches computers, then all the data and progress is gone and the user will have to start from the beginning.
Other than that, you probably need to add some error checking on enter slide (on every slide that requires the department var) that checks for your department var. If it is not there set an action to send them to a page to choose the department and then use the last slide visited to bounce them back to the slide they resumed on.
That might be a job for same shared actions! Here's a tutorial by lilybiri: http://blog.lilybiri.com/power-of-shared-actions-in-captivate
Hmmm.... values of user variables are not automatically kept when the course is relaunched AFAIK. When a course is relaunched, and bookmarking is enabled, the system variables (like te quizzing system variables) will be kept, but not the values of user variables.
BTW I have lot of tutorials about Shared Actions.
It's not recommended to have Self-Paced Learning turned on when your content is being delivered by an LMS with LMS Resume Data bookmarking also turned on. And turning on Self-Paced Learning does not automatically store user variables in browser Local Storage. It only stores a variable that Captivate has deliberately set up to record the learner's current slide when exiting the module.
User Variables are sent back to the LMS, and the LMS should return them, at least ours does.
They are sent in the cmi.suspend_data for SCORM 1.2.
Here is the result from one of my lessons (it looks like gibberish):
G1A%24nP1A%24nP1A%24nP1A%24nP1A%24nP1A%24nP1A%24nP1A%24nP1A%24nP1A%24nP1A%24nP000AA0000C-1 ECA%7E%24UW*SBlOP%7E%24UW*KulOP1010B00ACAD0%3B1B1B0B0B2B1B1DB%7E%24UW*cfpOP%7E%24UW*YPqOP1 010B10AEAH1%3B0%3B2%3B3B1B1B1B2B0B0B3B0B0B4B0B0EC%7E%24UW*m7sOP%7E%24UW*tttOP1010B00ACAD0% 3B1B1B0B0B2B1B1FD%7E%24UW*MoyOP%7E%24UW*uCzOP1010B10AEAH0%3B1%3B2%3B3B1B0B0B2B0B0B3B0B0B4B 1B10dK
LessonNameAbPolicy%20and%20Procedure%20ReviewTPLaD_Slides_VisitedAO%2C1%2C1%2C1%2C1%2C1%2C1%2C1NPLaD_previousBAQanimationPresentBAKccModuleIDB%24JMMccModuleNameAHPPR%20777IccPageIDBAKccPageNameBALccProjectIDB%246jNcontrolObjectA%5Bobject%20Object%5DNinInteractionBAEtextBAKvar_btn001BAKvar_btn002BAKvar_btn003BAKvar_btn004BAKvar_btn005BAKvar_btn006BAKva r_btn007BAKvar_btn008BAKvar_btn009BAKvar_btn010BAKvar_btn011BAKvar_btn012BAKvar_btn013BAKv ar_btn014BAKvar_btn015BALvar_testingAEtrueQcpQuizHandledAllBA$_#-#_$"
I highlighted in yellow some of my user variables. The green is the values. Captivate will decode all of this and make them into the values you were expecting to see.
I have the following for my publishing settings:
- Enable Reporting
- Send Interaction Data
- Send Data on every Slide
Not all LMS's do retrieve values of the user variables. You still have to restore those values on course relaunch as well?.
Scorm Cloud retains the user variables on revisit but it appears Cornerstone doesn't. I'm currently trying to test whether it doesn't retain any user variables or if there is too much info in my main project restore file. I'm not that familiar with Cornerstone to know if there are different settings that should be defined to allow tracking of user variables or not.
Cornerstone persists user variables just fine, provided LMS Bookmarking is turned on and the variables are set up to have no default values (as they would take precedence on course restart).