Forum Discussion

amorrissen's avatar
amorrissen
Community Member
9 hours ago

Correct layer not displaying based on button states

I'm working on a slide that has four statements on it. The learner clicks a thumbs up or thumbs down button for each statement depending on if they think it's true.

The button changes state immediately after clicking it to indicate if it was correct or incorrect. Here are all the states:

When all four statements have be answered, a feedback layer is supposed to display. If you get all of them correct, the "Correct" layer displays; if at least one is incorrect, the "Incorrect" layer should display. Here are the triggers:

The "Correct" layer displays correctly when you get all of them correctly. However, the "Incorrect" layer does not display. When I get any number of items incorrect, the "Correct" always shows.

I've tried a different type of trigger, but the result is the same. Only the "Correct" layer displays. I can't figure out what is wrong.

I've attached the Story file if that helps troubleshooting.

Thanks for any guidance!

4 Replies

  • I added some textboxes that show the states of the buttons to see what they were like, and it seems that the ovals referenced by your "Show layer incorrect feedback" trigger only ever change to the Correct state. Whether I click the thumb-up or the thumb-down for statement one, the thumbs-down button will always change to the correct state and never the incorrect state. As such, none of the four ovals referenced by the above-mentioned "Show layer" trigger will ever be incorrect, which means the incorrect layer trigger will never fire as true.

    If you update the "Show layer" trigger to look at the incorrect ovals in each statement instead of the correct ovals, then you'll have the opposite problem of the incorrect feedback layer always showing even if the learner gets all the choices right because, duh, each of the incorrect ovals always goes to the incorrect state as well.

    Reconciling this particular implementation will be interesting. For the way my head works, I'd create a number variable for each statement called something like q1answer, and default it to zero. Then I'd have the correct button change the value of q1answer to 1 and the incorrect button change the value of q1answer to -1. That variable change could simplify all of the visual updates with the states since they amount to "do A when q1answer changes if q1answer is <0, else do B (when q1answer is >0).

    Am I right that you basically want the incorrect feedback layer to show after each incorrect answer chosen?

  • amorrissen's avatar
    amorrissen
    Community Member

    Thanks for the analysis and test project. I think this helps clear up the issue. The buttons change to their correct/incorrect states to indicate to the learner what was the outcome. This happens when they click either button. 

    Your variable solution sounds like it will work. I will give that a try.

    Side note: Both feedback layers should only display after all questions have been answered. 4 correct shows the "Correct" layer and 1 or more incorrect shows the "Incorrect" layer. 

    Thanks!

     

    • AndrewBlemings-'s avatar
      AndrewBlemings-
      Community Member

      Happy to help. In thinking through this a bit more, I wonder if a simpler method might be to introduce a numeric counter?

      Each of the incorrect buttons could have a trigger that adds one to a number variable called wrongAnswers or something. Note, not set it to 1, but add 1. A perfect score would obviously mean someone ended the slide with wrongAnswers still at its default of 0. Someone who got every statement/question wrong would end with wrongAnswers equal to 4.

      To avoid learners increasing the counter by clicking an already-incorrect oval, I would duplicate the Incorrect state out to the built-in Disabled state.

      And then update the triggers to show the Disabled states instead of the Incorrect:

      That Disabled state will block all future learner interaction, ensuring one "wrongAnswer" per click.

      A trigger can show the incorrect feedback layer when all of the rectangle-markers in the upper-left have changed to Visited like you had, but just add the conditional "if wrongAnswers > 0".

      If wrongAnswers is zero, processing will "fall through" to the second trigger that shows the Correct Feedback layer.

  • Nedim's avatar
    Nedim
    Community Member

    All your buttons eventually change their states to "Correct", even when an incorrect button is selected. As a result, the outcome is always the same, and the "Correct" layer is shown.

    To avoid complicating the interaction further, I would include the q1-XX, q2-XX, q3-XX, and q4-XX objects in the else statements, since they play a significant role in your interaction.

    Change the triggers that show the "Correct" and "Incorrect" feedback as follows: