I’m developing a Quiz app with 5 different themes.
Each theme contains many questions with 4 response possible (configured using the Choice component).
I have 5 tables to manage all the data (questions).
I then use 5 different screens linked to 5 tables named “Random” for each theme.
It might sound a bit complex, but it works so far.
I have configured a button to display random questions related to the selected theme. This works by using the current date (via a set column value) and columns that “randomize” the values based on the number of available questions.
However, the problem is that this method displays some of the same questions multiple times.
What I’m aiming for is that when a user starts the quiz (by clicking the “Start Quiz” button), it triggers a session with one random question out of, say, 150 questions, and each question should only appear once during the session.
At the end of the quiz, I’d like to have a “Reset” button that starts a new session with a fresh random order of questions.
I’m still struggling with how to fully implement this logic, and I would really appreciate any help or guidance on how to get it working.
I would have one tab, with buttons for all themes.
Each button would set the theme name to a column in your user profiles table, and you then have a relation + joined list to get all rowIDs of questions from that theme.
Then, use JavaScript to generate a non-duplicated list of random IDs from the full set, and use that to display the questions for the quiz (I’m not sure how you’re setting that part up, it might be complicated).
Actually, I’m not using a single table (like the User table) because the questionnaires are quite long, and users should be able to temporarily exit an ongoing quiz to start another one without losing their progress. If I use a single table, the results of the quiz in progress would be erased when switching to another quiz.
Let me explain my configuration in more detail:
USC/Date Column: I have a User-Specific Column (USC) named “Date” that records the date and time when the user clicks the “Next” button.
Random Number Column: This column takes the timestamp from the USC/Date column and generates a random number between 0 and 1.
Rollup Column: It calculates the total number of items (questions and answers) in my data table.
Math Column “Random Position”: This column calculates a random position using the formula FLOOR(A * B), where:
A = the value from the Random Number column.
B = the total from the Rollup column.
However, I’m still struggling to fully grasp the logic I need to implement to solve this problem.
My goal is to ensure that when a user starts a quiz, they receive a set of questions in a random order without any repetitions. Additionally, they should be able to resume a quiz or start a new one without losing their previous progress.
Could you provide further guidance on how to achieve this within my current setup? Any help or suggestions would be greatly appreciated.
It sounds to me that your “Next” button should create a row in a “Session” table, and generate a set of questions at that point so the user can resume that session later. I haven’t got an idea to keep latter parts of your setup intact whilst making sure there are not duplicates.