Help with displaying quiz questions sequentially instead of randomly in Kodular

Correct,
Based on how you decided to set up the question, you should also save the index.

The setDialogLayout function simply hides all layouts and shows the one corresponding to the dialog that was passed to the procedure.
Since you are using only one dialog, you can just use VA_Dialog_BottomDrawer.Visible = true to show it when the user responds and hide it with VA_Dialog_BottomDrawer.Visible = false when the user clicks OK.

1 Like

I want to display the questions in order, but I don’t quite understand what you mean. Do you mean that I need to add another block or something else?

Also, is it okay to leave the text inside the Bottom Drawer empty and then display certain text there depending on whether the answer is correct or wrong?
Thanks again for your support!

  • if you decide to show the question based on the day, the day will be the index, so you won’t need to save it
  • if instead the questions must be shown every 24 hours from the last question, you’ll need to save the index
  • if you simply want to show them sequentially, here too you’ll need to save the index so that if the app is closed, on opening you’ll have the last answered index

of course

you could also create a procedure (VA_Dialog_BottomDrawer.Visible = true + setting the label containing the message)
to call the bottom drawer with a “message” parameter, so that every time you show the drawer you’re forced to pass that value, avoiding forgetfulness and showing the drawer with an inconsistent message

1 Like

Hi,
Thank you so much for your help so far.
I have an issue where the VA_Dialog_BottomDrawer appears at the top or in the middle of the screen instead of showing at the bottom like a Snackbar.
Do you know what the issue might be? Or is there a specific block I can use to make it appear at the bottom?
I have tried many things but nothing worked so far.
Thanks in advance!

Hi Noor,

have you seen the new extension our dear Ibrahim has created?
I think it can make everything much easier.

I think it’s just a simple alignment issue, check that VA_Dialog_BottomDrawer is vertically centered toward the bottom

Thank you so much for your great help, I really appreciate it.
I followed your approach, and it turned out the issue was just the placement of the Bottom Drawer on my side.
After reviewing your blocks again carefully, I finally understood where it should be placed, and now everything is working correctly.
Thanks again for your patience and support!

Always a pleasure dear,
Have a nice day!

1 Like