Save feedback layer information onto local storage

Jul 11, 2014

Hello,

I have a multiple choice question slide in my story and I am trying to extract the state of the feedback layer so that I can save it in local storage. I want to do that because I want the student to be able to resume to the exact state if they drop out with the connection. Currently if they drop out while doing the question (or click refresh), they can clear their previous selection and re-tr y the question until they get the right answer. Setting the number of attempt is not an option because I have to add a trigger to disable whatever option they've selected and not letting them select the same answer twice.

Any ideas in how I can save the state of the feedback layers onto local storage?

I think story.savetolocalstorage is an option but I can't find any information about this function.

2 Replies
Robert Lengacher

Kathy - I've never noticed this before, but I can understand why this is a problem. I just tested it, and I'm getting the same results.

  1. If the user is viewing the Incorrect feedback layer of a slide, she can reload the page and it returns her to the base slide where she can then select and submit a different answer.
  2. This "cheat" only works on the current slide, and cannot be used on previous slides.

I've tried a number of solutions that logically should work, but when the page reloads it seems to lose any variables that are set on slides themselves. Your solution might work if you do the following:

  1. Create a text variable to track what feedback layer they are viewing currentFeedbackLayer
  2. On the Correct Feedback layer add triggers
    Trigger 1: Adjust variable currentFeedbackLayer to a value of Correct when timeline starts
    Trigger 2: Execute JavaScript that pulls the variable currentFeedbackLayer from the Player and saves it to local storage
    Trigger 3 Execute JavaScript taht adjusts the variable currentFeedbackLayer to the value None when the user clicks the Continue button. This is because the danger of cheating disappears once the user proceeds past the entire slide.
  3. On the Incorrect Feedback layer add the following triggers:
    Trigger 1: Adjust variable currentFeedbackLayer to a value of Incorrect when timeline starts
    Trigger 2: Execute JavaScript that pulls the variable currentFeedbackLayer from the Player and saves it to local storage
    Trigger 3 Execute JavaScript that sets the variable currentFeedbackLayer to the value None and saves that value to local storage when the user clicks the Continue button. (This is because the danger of cheating disappears once the user proceeds past the entire slide.)
  4. On the Incorrect Feedback layer add the following triggers:
    Trigger 1: Execute JavaScript to pull the locally saved value for currentFeedbackLayer and set that value for the variable in teh Player when the timeline starts
    Trigger 2: Show layer Correct when the timeline starts on the base layer on the
    condition that currentFeedbackLayer has a value of Correct
    Trigger 3 Show layer Incorrect when the timeline starts on the base layer on the condition that currentFeedbackLayer has a value of Incorrect
Robert Lengacher

Just as a follow-up. You'll have to figure out the JavaScript yourself, but here's link to best practices for JavaScript in Storyline.

Personally, if your quizzes are not mission-critical, high-stakes evaluations, I probably wouldn't worry about it. In fact if the focus is more on learning rather than evaluation, it might actually be a good thing for the learner to see feedback for incorrect responses to better understand why the correct response works.

Let us know if you can get it to work.

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