[FREE DL] Quiz Template - Fill-in-the-blanks (Dynamic JSON Quiz)


(Stephen G) #1

Hey all! After failing to find a fill in the blanks style quiz on the forums I have created one that uses a JSON file to store the text and answer data externally. Its yours to use as you wish!

Happy quizzing, @STE2DG

Quiz Demo:
CLICK ME >

Download Template:
FILL-IN-THE-BLANKS-quiz-template.zip (153.6 KB)


#2

Thanks for sharing this @STE2DG!


(Matt) #3

Hi Stephen -
Thanks so much for this! I really want to use it in a project I’m working on but for some reason it is not functioning properly.

I have not made any edits yet when I preview your original hype document the text fields are displaying the wrong text and the answer field is not excepting the answer.

Can you confirm that everything is set up correctly?

(Your demo link does function normally)

Thank you!
Matt


(Matt) #4

Update:

It appears to be working fine. Sorry for the confusion!

Matt


(Stephen G) #5

No worries @matt5834 if text appears in the wrong text field it means that the ordering in the json doesn’t match the ordering of the elements (with classes applied) in the scene or that there are more or less layers with class names applied than your json is expecting to see.

Another tip is to have unique class names for different scenes. Hope this helps if you encounter any other problems.

Steve


(Carlos Mena) #6

Hello, I have modified the JSON file, but the template is not modified. Could you please help me?


(Stephen G) #7

Hi @camenar the structure of the json file should exactly match the layering on your scene. If you share your project I can have a quick look for you to see if it is an easy fix.

Regards,
Stephen.


(Carlos Mena) #8

Hello, then I share the project. Is to note that I’m new to the interaction between hype, javascript and Json.
Thank you.Quiz_Restas.hype.zip (47.3 KB)


#9

If you preview your document then you will see that it is working. Unfortunately, you will not be able to preview inside Hype.


(Carlos Mena) #10

thanks for the info.


(Stephen G) #11

Quiz_Restas_2.hype.zip (47.0 KB)

@camenar This is working fine for me when I preview it from Hype, use this new file as your starting point! Good luck with your project.
Stephen.


#12

Hello
I am very interessted in this template. But I have the same problem as Matt…the text fields are displaying the wrong text and the answer field is not excepting the answer.
I am new and not a programmer. So I dont know what to do with the json…I do not understand what to do with this hint:

No worries @matt5834 if text appears in the wrong text field it means that the ordering in the json doesn’t match the ordering of the elements (with classes applied) in the scene or that there are more or less layers with class names applied than your json is expecting to see.

Could anybody help me?
Thanks a lot!


(Jonathan Deutsch) #13

The issue is that the original code assumed a specific ordering of the elements. This ordering wasn’t guaranteed (and changed for accessibility improvements in Hype v3.6). I changed the code a little bit so it uses a different class name that corresponds to the keys in the JSON. I’m not sure about all the original code intentions, so it might not be able to be used in the same way…

FILL-IN-THE-BLANKS-quiz-template-fixed.zip (190.3 KB)


#14

Hi Jonathan

Thank you very much for the template! I will probably use it in a game for our museum.

Best

Pascal