Skip to main content
Participant
January 21, 2023
Question

is it possible to have Captivate count the number of times that answer A,B and C were selected?

  • January 21, 2023
  • 1 reply
  • 97 views

Hi, I hope someone know how to do this.

 

There is a quiz. It has 30 questions. Each question has 3 answers to choose from, A and B and C.

The goal is that at the end of the quiz, if more A's were selected by the user, then show message X as feedback. If B's were selected more, then show message X1 and if C's were selected more, then show message X2 as feedback.

 

I hope it could explain it clearly.

 

 

Thank you very much.

 

    This topic has been closed for replies.

    1 reply

    Lilybiri
    Legend
    January 22, 2023

    Sure that is possible. There is a system variable cpQuizInfoAnswerChoice which can be used. I explained the use of this variable more extensively in this blog post:

    https://blog.lilybiri.com/using-cpquizinfoanswerchoice-for-survey-conversion-from-swf-to-html

    You will need also three user variables to store the number of answers for each answer number, I will label them v_A, v_B, v_C. They can start with a value of 0.

    Since you didn't explain if  you are talking about real quiz slides which have a correct answer or about a survey type of quiz slide, I will explain for normal quiz slides. Use both the Success and Last Attempt event to trigger an advanced action, which needs three decisions (conditional):

    IF cpQuizInfoAnswerChoice is equal to A

        Increment v_A by 1

        Continue

    IF cpQuizInfoAnswerChoice is equal to A

        Increment v_A by 1

        Continue

    IF cpQuizInfoAnswerChoice is equal to A

        Increment v_A by 1

        Continue

    IF cpQuizInfoAnswerChoice is equal to B

        Increment v_B by 1

        Continue

    IF cpQuizInfoAnswerChoice is equal to C

        Increment v_C by 1

        Continue

     

    A shared action would be better, but I don't know if you ever used them?

     

    I don't know if you want to use the Results slide to show the feedback? Let me know, I will just mention how you can do it on a custom slide:

    • Create a multistate object Tx_message where the Normal state is invisible (shape with Opacity and Stroke set to 0).
    • Add three custom states: X1 has message 1, X2 has message 2 and X3 has message 3.
    • You'll need another conditional action which can be triggered by the On Enter event of the slide. I will keep it easy for the same reason as mentioned above:
      IF v_A is greater than v_B  AND
           v_A is greater than v_C
         Change state of Tx_Message to X1
    • IF v_B is greater than v_A  AND
           v_B is greater than v_C
         Change state of Tx_Message to X2
    • IF v_C is greater than v_A  AND
           v_C is greater than v_B
         Change state of Tx_Message to X3
    • Beware: if may be necessary to change one or more of the logical operators 'greater' to 'greater or equal to'.