Storing variables across sessions

build learning interactivity

Moderator: Nav

Storing variables across sessions

Postby Nav » Fri Feb 24, 2012 2:28 pm

Here's a video showing you how to store information (variables) across sessions. This example uses an LMS, but you could just as easily store it using Cookies. This only works for storing all the Global Variables, so make sure you set up your Variables accordingly. Most of the work is setting up the actions around the variables to work with your objects once they are retrieved. There are only two actions required to just store/retrieve the variables. Those look like this:

Trigger: Page Controller > onPageChange // or something more appropriate for your lesson
Response: SCORM/AICC > setSuspendData > Function > Page Controller > getGlobalVariables // basically you're sending data to the LMS, and that data is your variables

Trigger: Page Controller > onPageLoad // this could be on the Master Page
Response: Page Controller > setGlobalVariables > Function > SCORM/AICC > getSuspendData // update the variables with the data retrieved from the LMS

Here's a video showing the process:
Part 1, setting up the actions: http://screencast.com/t/yZBd7nMt
Part 2, testing in the LMS: http://screencast.com/t/fZY388cHwVC

There is a Lesson in the Shared Library > Examples folder in SmartBuilder called Remember Variables Test that you can save a copy of and tear apart if you learn better that way.

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

Re: Storing variables across sessions

Postby Merel » Wed Aug 12, 2015 3:19 am

Hi Nev,

I have a similar question about storing and showing different variables in the LMS.
In the module we are going to make, we will have about nine variables.

It would be great if we could not only see in the LMS if the student has passed or not, but also shows you the score of those nine variables.
I already watched a tutorial about storing those variables into the LMS. But how can we accomplish to show them?
Like now it is shown someone has passed the module.
The variables will have scores between 0 and 10.

I hope you can help us out.
Kind regards,

Merel
Merel
 
Posts: 9
Joined: Wed Jan 14, 2015 2:33 am

Re: Storing variables across sessions

Postby Nav » Wed Aug 12, 2015 9:26 am

Hi Merel,
There's a series of Video Tutorials on SCORM topics now on the help site - help.smartbuilder.com/videoTutorials#howto

If you want to store and retrieve your variables, you can watch this video (covers the same stuff as above) - http://help.smartbuilder.com/node/614 - As you've found, this information is simply stored in the LMS, but is not displayed in a report or anything.

As for displaying the information in the LMS, you'll want to use what are called "objectives". Basically, these are secondary scores that you can assign a name. So you might send exercise1 = 50%, and exercise2 = 89%. This information is visible to the LMS, and can be included in a report. How do you generate a report with the Objectives included? That depends entirely on the LMS, so you'll have to ask them. But to store the information in the right place, you can follow the steps in this video tutorial - http://help.smartbuilder.com/node/608

I believe you'll have to normalize your score to be 0-100. I don't think the LMS will understand 0-10, but you might be able to experiment with it. If you're running into any issues, contact us via chat, and we can look at it together.

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

Re: Storing variables across sessions

Postby Merel » Thu Sep 03, 2015 5:12 am

Hi Nev,

OK thanks.

I actually have two other questions, and I can't find the answers on the forum:

- I have made some multiple select questions, with my own buttons. This means f.e. I have the action: when button 1,3 and 4 are clicked, show feedback correct. And otherwise show feedback incorrect.
Now for those buttons I have two states: one normal, and one 'clicked' or toggled. I now want smartbuilder to remember those states. So when i go to the next page, and I come back, I still want my answers to be shown. Is this possible?

- When I move with my cursor over a button, I want it to become a hand. When I test it in Google Chrome, I do get those hands, but not in Firefox. Is there a way to show the hands also in firefox?


Thanks in advance.


Merel
Merel
 
Posts: 9
Joined: Wed Jan 14, 2015 2:33 am

Re: Storing variables across sessions

Postby Nav » Thu Sep 03, 2015 11:53 am

Hi Merel,
1. Yes, I think this is possible, but it depends a little bit on the context of your exercise. Basically, the general idea is that for each button you'll have to create a separate True False variable to remember what their selection was, and then a conditional action on each button to set that variable to true or false. Then you'll need another action when they return to that page (or display) to set the setClicked state of each button back to the variable. So it's going to be a number of steps involved.

2. I get a hand cursor in Firefox. What version are you using? I'm using version 40.0.2, and I'm using Windows 7. Perhaps there is something strange with your version? I know there is a property on buttons to "Show hand cursor", which might have been turned off, but then I wouldn't expect it to work in Chrome.

If you want to start a support chat with us, we can look at your exact lesson and help you set up a few of the actions, and you can go from there.

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


Return to Action/Flow Chart/Variable

Who is online

Users browsing this forum: No registered users and 1 guest

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