Skip to main content
Participating Frequently
September 22, 2015
Question

How to stop points accumulating in a quiz if user changes answer

  • September 22, 2015
  • 1 reply
  • 363 views

Hi!

I have built an activity where the user selects buttons (which have different points) to calculate an end score.

How can I stop points from accumulating in a quiz, if a user changes their mind and makes multiple selections?

Can I use advance actions so that if a user selects High, and then changes their mind and selects Low, these points aren’t added together?

Any ideas? Thanks! 

    This topic has been closed for replies.

    1 reply

    RodWard
    Community Expert
    Community Expert
    September 22, 2015

    You cannot use Advanced Actions to manipulate the quiz results as the system variables in that case are READ ONLY.

    Perhaps you shouldn't be setting these thing to report to the quiz but have them assigning User Variables instead.  Then you can do calculations with Advanced Actions and display the results in captions or shapes.

    zeehaen85Author
    Participating Frequently
    September 22, 2015

    Great, thanks for your advice!

    So I have created 5 variables:

    score1 (value: 0)

    score2 (value: 1)

    score3 (value: 2)

    score4 (value: 3)

    score5 (value: 4)

    And I have assigned these to each button along the scale, like this:

    I would be happy for the activity to display three results, depending on what the user has selected, in a caption.

    For example:

    Caption1 – “A perfect match!”

    Caption2 – “You’re treading on middle ground here!”

    Caption3 – “Terrible! Keep looking.”

    Could you give me a little more guidance on how to calculate which caption would appear with an advanced action?

    You’re a star! 

    RodWard
    Community Expert
    Community Expert
    September 22, 2015

    I would be doing things a little differently to the way you have it set up.  I would have 7 variables, each of which relates to one of the skill categories (Presentation Skills, Communication Skills etc), and one more to hold the final score.

    I would initialize the variables at a value of 0, and do the assigning of the variables with the Conditional Action. (I would be doing this because it would then mean I could use decision blocks to check for the initial value of 0 to know if the category had not yet been assigned a score. if on the other hand you MUST use 0 as the score for clicking the first item in each category, you could still use 0, but you'd need a little more complexity in your final Condition statement mentioned below to check for a NULL value.)

    Since you're wanting the clicking of any of the 5 objects in each category to do something, you'll need to set it up so that the user clicking one of the selected objects in each Category executes multiple actions from a single click.

    Since you have 7 categories and 5 possible answers, you'll need 5 x 7 Conditional Actions, or 35 of them.  I'll save Lilybiri the trouble of pointing out that you can use Shared Actions here to save work.

    The first Decision Block in the Conditional Action will need to have a condition statement that is always TRUE.  Generally using something like IF 1 = 1 works well.  The Action statement underneath will assign the relevant variable to a number corresponding to their score in that category (1-5). 

    The other decision blocks that follow the first one will then look at the value of the newly assigned variable to see if it corresponds to something they should execute an action for. (e.g. Hide and show objects)

    If you use my suggestion above about numbering from 1-5 with 0 as the variable default, then your very last decision block in each of the 35 conditional actions would be to check that all of the category variables have been assigned a value greater than 0 and if so, to show the Submit button which will take them to the next slide which displays their results.  That slide will use its On Slide Enter event to execute another Advanced Action to work out their score and display it in a text caption or shape object on the slide.  You'll need another user variable for that.