I work in a school and I'm trying to make a quiz. Its a science one and one of the questions is
Which two organs are where digestion of food occurs?
I have 6 answers as checkboxes. How do i score multiple checkboxes?
So far i have
If(Checkbox1.Value = true, Set(Score,1),Set(score,0))
I also want to add 1 to the score if checkbox1_5 is true.
The score,0 is to automatically set the score to 0 on a retake of the quiz.
I am mainly doing quizzes at the moment. If there is any help you can point me in the direction off it would be great. Even though i'm stuck the quiz part seems simple but i wanted a good finish page. Something that shows the overall mark and maybe which answers they gave incorrectly and what the correct answer was
I was hoping for a finish page that showed the score and
Solved! Go to Solution.
There are a variety of ways to go about this. The key will be how to make it manageable in some way.
I have done similar and found that having two labels in the app (doesn't make a difference where), one for correct answers and one for incorrect answers.
Now, let's say you have 6 checkboxes for your digestion question, two are correct and 4 are wrong. I will call these Checkbox1 through Checkbox6. Checkbox3 and Checkbox 5 are correct and the rest are wrong.
In the Correct Label you would have the following formula:
Sum(
[Checkbox3.Value, Checkbox5.Value],
If(Value, 1, 0)
)
In the incorrect label you would have:
Sum(
[Checkbox1.Value, Checkbox2.Value, Checkbox4.Value, Checkbox6.Value],
If(Value, 1, 0)
)
Now that you have these labels, they will have the sum of all of the correct and incorrect answers. You can refer to those labels anywhere you need to get the value - ex. Value(labelCorrect.Text) would be the number of correct answers.
Anyway, this is just one of many ways. This one I particularly like because it is relatively simple.
I hope this is helpful for you.
There are a variety of ways to go about this. The key will be how to make it manageable in some way.
I have done similar and found that having two labels in the app (doesn't make a difference where), one for correct answers and one for incorrect answers.
Now, let's say you have 6 checkboxes for your digestion question, two are correct and 4 are wrong. I will call these Checkbox1 through Checkbox6. Checkbox3 and Checkbox 5 are correct and the rest are wrong.
In the Correct Label you would have the following formula:
Sum(
[Checkbox3.Value, Checkbox5.Value],
If(Value, 1, 0)
)
In the incorrect label you would have:
Sum(
[Checkbox1.Value, Checkbox2.Value, Checkbox4.Value, Checkbox6.Value],
If(Value, 1, 0)
)
Now that you have these labels, they will have the sum of all of the correct and incorrect answers. You can refer to those labels anywhere you need to get the value - ex. Value(labelCorrect.Text) would be the number of correct answers.
Anyway, this is just one of many ways. This one I particularly like because it is relatively simple.
I hope this is helpful for you.
User | Count |
---|---|
251 | |
102 | |
94 | |
49 | |
37 |