Bullet formed questions with % score at final screen

Haskell shared this question 4 years ago
Answered

I'm trying to create a simple questionnaire Exam for a mobile device.


The Mockup would display a question per screen for the user to answer. Once the user clicks on one of the radio button answers, a new screen is displayed with a new question and new answers. The users will go through a series of questions/answers until the last screen will display the final results of the Exam. The final screen will display the % score.


What would be the best way to store the user selections (via bullets) then callback on the final page for calculating the percentage score?


Here is an example Question & Answer User screen:


b0496699e11435d8320466a8954c5b82

Comments (5)

photo
1

The easiest way is to have a variable called score and doing 'score = score + 1' every time the answer is correct. (remember to set it to 0 at the first question). Then at the score screen do 'result = score*100/number_of_questions' and that should give you your result in %.


I hope this is what you were trying to simulate.


Best,


Marc

photo
1

I'll try that! Thanks marc.

photo
1

This works but it's not reliable when it comes to Panels.


I have Set an action when a radio button is tapped, it sets the value of a Label to calculate as "Score+1". Score default value = 0.


When I simulate it works fine. However, if I create a Dynamic Panel with 4 panels and create a Radio Button in each panel with the same calculation, the Label which is NOT inside the Dynamic Panels, gets updated only when the first Panel Button is tapped. The other panels don't work. Just as an fyi, I have a separate button that is linked to the next panel.


So I would simulate, click radio button, Label would display "1", click "Next" button that Sets state to Panel 2, click on Panel2 radio button, Label value does not change. Same for the other Panels.


Am I doing something wring?

photo
1

It appears that I have to add 2 actions instead of one.


Action#1 sets variable "Score" = "Score+1"


Action#2 set Label = Score.


So now this works in all the panels. Great!


However, my next problem is trying to figure out an equation that will prevent multiple clicks on the Radio Button, so that each click doesn't keep adding a new value. If I click on the Radio button twice, the value now becomes 2, which is not what I desire.


Any ideas?

photo
1

You could have a true/false variable to know for each panel if the score has already been counted.