I’m building a quiz app and need some advice on the best way to handle answer highlighting and user progress tracking with minimal database workload:
When a user clicks an answer, it should immediately highlight green if correct or red if incorrect. If the user clicks a wrong answer, the correct answer should also be highlighted. Once an answer is selected, it should lock and not be changeable for that question. These highlights should reset when moving to the next question.
In the background, I also want to track long-term user knowledge for each question. For example, if User A takes QuizSession 123 with Question Z twice and answers correctly both times, his knowledge score for that question should be 100%. If User B takes QuizSession 125 with Question Z once and answers incorrectly, his knowledge score for that question should be 0%. At the same time, I want to track global question difficulty based on all user attempts (e.g., 66.67% if 1 out of 3 attempts was incorrect for question Z).
You will need to store the correct answers in your database and assign a condition to each input value a user writes; something like this(input’s value is not parent’s group answers),it’s highlighted and vice versa.
For the user knowlegde, each question should come with a user count on each of them, so if a user answered twice, count is 2, once then count is 1 and like that
Would you be open to a paid coaching session to help me set up this logic?
I tried different method (more recently Local Storage) and still struggle with this
My questions are currently stored as a data type in Bubble. The goal is to let users filter questions by topic, subtopic, and other criteria (for future features), then start a custom quiz based on their selection. I also want to track user progress and gather stats on each question taken.
Is this something Data Jedi can handle how would the implementation be?
Thanks
Hey @karim_ben , if you’re still looking for some guidance, I have a video that shows how to build out a survey system. A lot of the concepts there can be applied to what you’re doing. Obviously since yours is a quiz where there are right and wrong answers, there are a few extra pieces you’ll need. Anyway, this could give you a good foundation: https://youtu.be/NYwJ3fU1CTM
I do offer consulting if needed, but wanted to share this in case it’s enough to point you in the direction you need.
@karim_ben you can check out the videos in this Youtube Playlist on how to build the quiz app for lowest workload unit consumption.
As of right now it is just the two parts of me building it, which is around 2 hours, with likely too much detailed explanations of why I am doing each thing that I am doing. I’ll be creating the video of me testing within the next couple of days.
In terms of what to expect from the build if following my approach regarding Workload Unit costs of a single user taking a single test one time and having all data stored into the database:
Page Load = 0.15 WUs (this is via direct link to the specific test)
Fetch Current Page Test from DB = 0.15 WUs (this is an individual data request to fetch the page test)
Add data to Bubble DB when test is complete = 1.62 WUs (this is a single create a new thing in DB workflow action cost)
Total cost is just under 2 Workload Units, and this likely would not be any different if the quiz/test was 10 questions or 1,000 questions. And if the user doesn’t complete the test, the Local Storage will have all details so they can easily pick up where they left off.
Now, in reality, there is much more that would need to be done to build out all necessary features, so keep in mind, my videos are just showing how to build the portion for which the user interacts in order to take the test. The videos do not show how to build the parts of the app to allow users to create tests, search/find tests or admins to run analytics etc. But all data structuring is done in such a way that the analytics requested in your post are possible to extrapolate from the data stored in the DB.
Thanks a lot for the videos! I really appreciate you sharing your approach. However, it seems a bit complex for me at this stage, as I am still figuring out the best way to pull the quiz questions, whether from the Bubble database, local storage, or possibly another solution. I’m trying to balance ease of setup, performance, and costs.
Yes, if the OP was asking for minimal workload unit approach and you are after a balance of ease of setup, performance and costs, those are two different focuses and so may require different approaches.
I think what seems complex is JSON which is just textual representations of the same thing that is a bubble custom data type.
When I first got started trying to use JSON it seemed so over my head due to the fact my brain interpreted it as if it was actual code. After a couple of hours playing around with it and then 10 minutes reading some rules about it, I became familiar with the half dozen formatting rules needed to be known to work with it easily. At first it seemed so foreign and complex, but in the end, it is just a way to format the same kind of information we use for custom data types.
You’ll need to familiarize yourself with JSON in order to use local storage as local storage can only store text.
I’d imagine that is potentially an external DB - leads to complexity issues far greater than formatting JSON
The approach I use is a Hybrid Data structuring approach that uses the Bubble database, so it is no more or less complex than fetching a normal custom data type and using the fields within your dynamic expressions.
You’ll love my solution then when it is released as a free template…so simple to setup and has the best performance and lowest costs possible. But in the end, just following along in the video most new users will be able to recreate the same powerful setup hassle free.
The way the plugin delivers the type of power necessary makes it so easy to setup as most of the workflows required just one or two actions - which would make it easier to setup than most any other approach, as well as maintain and debug.