Calculating a score with a simple quiz app

Working on a simple true or false quiz app. Having trouble getting it to properly calculate the pass or fail. Right now it’s passing the user regardless of if they actually pass or fail.

Made the app public here… https://bubble.io/page?type=page&name=quiz&id=levonquiz&tab=tabs-1

Data type: Quiz

Fields:
Question (text)
Answer (text)
Question number (number)
Question list (list of quizs)

There are 15 questions and 10 or more correct is passing. I’m using a custom state to pass the score along from question to question. The custom state is set to “0” on page load and then “1” is added to the “score” custom state every time a correct answer is chosen.

I think the problem lies with the following two circled workflows…

If anyone can let me know what I should be doing here to get it to calculate the score properly, it’d be most appreciated. My guess is that it’s something simple that I’m missing.

Thanks!

How do I start the quiz in the preview to test the workflow?

Data was only in the live database. I’ve copied it over into the development database as well so that you can properly test the workflow.

You forgot to set the condition for the button false and true. The buttons are checking if the answer is right or wrong so you have to reference the element the question is in.

Sometimes I miss the simplest things in bubble.

The element the question is in is the “Text Current cell’s text” text box. How would I go about referencing that by setting conditions on the True/False buttons?

If you go to the workflow for the false or the true button where it changes the score, you could set the condition for the “search quiz…”

I set the conditions for you it should work now.

1 Like

Ok, I see what you did there. It did the trick…works great. Much appreciated @muradamod!

@rucelvirata messaged me to let me know that the sample quiz app was no longer working so I’ve recreated it in the public forum app for anyone who may need to refer to it.

4 Likes

Thanks for sharing :slight_smile: