Setting Variables based on a User's Answer

Aug 21, 2013

I would like to set up a course that records a specific variable value based on if a user gets a question correct  or incorrect.  The questions do not include feedback, so I cannot use the button off the feedback layer to acheive.

Right now, I am setting variables based on a user clicking each individual answer option.  Later in the course, those variables are used to determine if users have to view pages that correspond to the questions.

Is there an easier way to do this?  Essentially to record what questions a user got wrong?

9 Replies
M K

Hi,

Another way is to have empty correct and incorrect layers and on timeline-starts trigger, set the variable like following

Correct layer --> on timeline-starts --> adjust variable isQ1Correct = true

incorrect layer --> on timeline-starts --> adjust variable isQ1Correct = false

This approach is dynamic (no hardcoding) where you do not have to determine the incorrect options on the screen and set variable on each option's click trigger.

Also its easy to copy on other question slides. You have to just copy those two empty layers and paste them on other quiz slide and just change the variable...that's it...This will avoid writing click trigger on each option and too on every question slide.

Another advantage is, this approach will work on other type of question slides as well like drag n drop, sequencing etc.

--

MK

Ryan Lowry
M K

Hi,

Another way is to have empty correct and incorrect layers and on timeline-starts trigger, set the variable like following

Correct layer --> on timeline-starts --> adjust variable isQ1Correct = true

incorrect layer --> on timeline-starts --> adjust variable isQ1Correct = false

This approach is dynamic (no hardcoding) where you do not have to determine the incorrect options on the screen and set variable on each option's click trigger.

Also its easy to copy on other question slides. You have to just copy those two empty layers and paste them on other quiz slide and just change the variable...that's it...This will avoid writing click trigger on each option and too on every question slide.

Another advantage is, this approach will work on other type of question slides as well like drag n drop, sequencing etc.

--

MK

MK, are you still following this post? Is your advice still applicable to Storyline 2?

This discussion is closed. You can start a new discussion or contact Articulate Support.