How can I keep a running total in Storyline 2

Hi all, I'd like to keep a running total of clicks on buttons to generate a percentage of 'x% of people got this right'.

I've made three variables - click / correct / percentage - when someone gets to a question their right and wrong clicks are counted and it works out a percentage. It's fine for a single user. 

What I want it to do is to store the click and correct variables so everyone who tries the module has their clicks counted and aggregated to a collective score and a proper percentage, otherwise the calculation is just based on each individual's attempt.

Is this possible?

3 Replies
Andy Muir

Hi Milk

My thoughts would be to have a separate database table, with two entries, clicked and correct. You would need to call your own PHP file on your own server such as

http://www.myservers.com/clicked.php?correct=true

If correct is true, php should read in the two values, add one to each value. If correct is = false add one to clicked only. You will need some very basic PHP / MySQL to achieve this of course.

Hope it helps.

Andy

Milk Studio

Thanks Christie, Andy.

@Andy, do you have (or know of) any examples of the above. It sounds like a logical step, adding clicks to a database (or a txt file) but would be good to see this in action, especially pulling the numbers back into the storyline module in order to do the calculation.

cheers :)