8 Replies Latest reply: Mar 3, 2014 10:31 AM by Sreekanth_S RSS

    Custom quiz Advanced Actions not working

    Sreekanth_S Community Member

      I am creating a custom quiz using advanced actions and Jim's enhanced check box widget.

       

      Features of quiz:

      • Three buttons: Submit, Try Again, Next. The Try Again and Next buttons are hidden initially.
      • Total Score: variable name "TotalScore"
      • Count attempt of each question: variable "Q1Att" initially set to 1
      • v_null set to 0

       

      Three correct answers out of 5 options:

      • Ans1 -- variable name "varAns1"
      • Ans2 -- variable name "varAns2"
      • Ans3 -- variable name "varAns3"
      • Ans4 -- variable name "varAns4"
      • Ans5 -- variable name "varAns5"

         

      Advanced Actions on Submit button:

      Decision 1: Correct

      If

      Q1Att is 1 AND

      varAns1 is equal to Ans1 AND

      varAns2 is equal to Ans2 AND

      varAns3 is equal to Ans3 AND

      varAns4 is equal to v_null AND

      varAns5 is equal to v_null AND

      then

      Increment TotalScore by 10

      Show Next button

       

      This works fine.

       

      Decision 2: Try Again

      If

      Q1Att is 2 AND

      varAns1 is not equal to Ans1 OR

      varAns2 is not equal to Ans2 OR

      varAns3 is not equal to Ans3 OR

      varAns4 is not equal to v_null OR

      varAns5 is not equal to v_null OR

      then

      Show Try Again button

       

      This is not working. The Try Again button does not show up.

       

      Please advise.

       

      After these two decisions, I have couple of other decisions checking for getting the answer right on 2nd attempt and for Failure, in that order.

       

      Sreekanth

        • 1. Re: Custom quiz Advanced Actions not working
          Lilybiri CommunityMVP

          Hi Sreekanth,

           

          When is Q1Att incremented?

           

          Looking at your conditional action, I see that you don't cover all possible situations. What if Q1Att = 1 and not all of the first condiditions results in correct?

          The combination of AND/OR, especially with 'not equal to' can cause problems.

           

          Cannot try to repro, don't have all the details.

           

          Lilybiri

          • 2. Re: Custom quiz Advanced Actions not working
            Sreekanth_S Community Member

            Hi Lilybiri

             

            Q1Att is incremented on clicking the Try Again button.

             

            I have set the 2nd decision (Try Again) to Custom, so that I can use the combination of AND and OR.

             

            The other two decisions I have are:

            Decision 3: 2nd Attempt (Getting the answer right on 2nd attempt)

            If

            Q1Att is 2 AND

            varAns1 is equal to Ans1 AND

            varAns2 is equal to Ans2 AND

            varAns3 is equal to Ans3 AND

            varAns4 is equal to v_null AND

            varAns5 is equal to v_null AND

            then

            Increment TotalScore by 5

            Show Next button

             

            Decision 4: Fail (fail on getting the answer wrong on 2nd attempt)

            If

            Q1Att is 2 AND

            varAns1 is not equal to Ans1 OR

            varAns2 is not equal to Ans2 OR

            varAns3 is not equal to Ans3 OR

            varAns4 is not equal to v_null OR

            varAns5 is not equal to v_null AND

            then

            Show Next button

             

            Sreekanth

            • 3. Re: Custom quiz Advanced Actions not working
              Lilybiri CommunityMVP

              The problem are those custom combinations, they are very tricky, since you cannot have parentheses in the condition. One of my old requests, sighing again. Explaining:

                (Cond1 And Cond2) OR  (Cond3 OR Cond1) is not the same as

               

              Cond1 AND (Cond2 OR Cond3 OR Cond4)

               

              It is only by trial and error that you can find out which interpretation is given by CP.

               

              Moreover I learned always to avoid 'not equal', it is often not working.

               

              Is this what you want:

              • If first attempt is totally correct, Next button shows, and score is incremented by 10
              • If first attempt is not totally correct, Try again appears
              • When second attempt is correct, score is incremented by 5, Next button shows
              • When second attempt is incorrect, Next buttons shows.

               

              Question has 3 correct answers out of 5 possible answers. Are you using vars for the correct values of the answers or was that only for explaining?

               

              My AA intuition tells me that I may be able to find an easier way than your custom combination conditions. First confirm if this is what you want?

              • 4. Re: Custom quiz Advanced Actions not working
                Sreekanth_S Community Member

                Thanks for offering to help Lilybiri.

                 

                Yes, that is what I want. I am using the variables in Jim's widget. Here is the screenshot. I have added these variables in the variables list.

                MultiSelectIssue.png

                 

                Once I get it right for the first question, I intend to replicate it for other questions.

                 

                I have other objects (such as an image and relavant feedback captions) that are initially hidden and appear based the decisions. But those are just cosmetic.

                 

                Sreekanth

                • 5. Re: Custom quiz Advanced Actions not working
                  Lilybiri CommunityMVP

                  Fixed, got it working, with 3 decisions. My values are different (Dutch), will post screenshots, easier.

                   

                  Basic difference: I started attempts variable with 2 as default value, it was labeled v_number (had that one already in a scratch project) and is decremented by the Try Again button. Have 3 decisions:

                  • For any correct answer, which means only the checkbox variables have to be checked:
                    Correct.png
                    Had to hide the Again button as well, since it could have appeared in second attempt. You see in Expression why I needed value '2' for first attempt and '1' for second attempt.

                   

                  • Second decision 'SecondTry' will show the Try Again button if condition is fulfilled.
                    SecondTry.png
                  • Third decision is if the answer is still wrong after second attempt
                    Wrong.png

                  I could have grouped the Again and Submit button to have two statements less.

                  Try it out, my tests were positive. Bit thinking out of the box, sighing, love this kind of cleaning up.

                   

                  And the Standard action for the Try Again button:

                  TryAgain.png

                   

                  Lilybiri

                   

                  PS Maybe you'll have to tweak if you want to enter the score of this question slide to a total score, you'll know how to do that.

                  • 6. Re: Custom quiz Advanced Actions not working
                    Sreekanth_S Community Member

                    Thanks Lilybiri. This works fine now.

                     

                    However, what I thought as cosmetic addition is not working now. Sorry, if this makes your previous effort not worth it.

                     

                    I had three types of feedback text captions, One for getting the answer right on 1st attempt, another for getting it right on 2nd attempt, and one for the failure. The ones for getting right on first attempt and failure appear correctly. But the one for getting it right on 2nd attempt fails to appear. Instead of that, I get the feedback caption for getting it right on 1st attempt.

                     

                    Sreekanth

                    • 7. Re: Custom quiz Advanced Actions not working
                      Lilybiri CommunityMVP

                      You didn't talk about those captions, I didn't see them in the AA you described. I always try to get a clear picture of the problem before spending time on it, but you left that info out of the description.

                       

                      What is the difference between those feedbacks? You could insert a variable to show that they got it right on "x" attempt but it will have to be a new variable if you want again 1 before  2 instead of 2 before 1.

                      • 8. Re: Custom quiz Advanced Actions not working
                        Sreekanth_S Community Member

                        Yes, it was indeed a mistake from me. Underestimated its importance.

                         

                        Your suggestion should work. Thanks for all the help.

                         

                        Sreekanth