Hi there! I am building an exam app and I am stuck at the page where the questions will be displayed.
My database is structured the following way:
Exam:
Title
Description
Question (List of Questions)
Question:
Text
Exam(Exam)
Options(List of Options)
Options:
Text
Question (Question)
Correct (Yes / No)
Each exam has a set of questions and each question has a set of options.
I would like to display 1 question at a time with its set of options when the user clicks “Next” it should display the next question.
Can someone explain how this can be done? Your help will be much appreciated!
Thank you so much, you are a star! This is exactly how I wanted to display the questions.
If I understand correctly you have a RG within a RG the first one for the question and 2nd for the options.
In the first RG you are displaying: current Exam’s Questions – from custom state’s value # until custom state’s value #
Correct?
Also I see that you have some CSS on the page to hide the ugly RG scroll bars - if I use the same CSS on another page in my app would it work?
Lastly, do you know how I can automatically submit the exam if there are no more questions?
Yes that’s exactly right. I configured like this to let you navigate between questions with the Next and Previous buttons.
Yes, you would just need to give the other RGs (on your other pages) the same ID rg-scroll
Or give it any other ID and change the CSS accordingly
You can build a conditional workflow:
When exam_test’s Question is Current Page Exam’s Questions:count → Create a new Response
See the editor again to see what I mean