Blogging Tips Google Docs How to ? Programming tricks Websites and Blogs

Create a Dynamic Quiz Using Google Sheets and JavaScript

Being a teacher you may always want to create practice tests, quiz tests and online exams for your students. Tests and quizzes are very essential to enhance your student’s skills. Though there are some apps/sites available on internet for conducting quiz and tests, but how about organizing the same with a Google Spreadsheet. This is where our tool will comes handy. We have created this app which can help you to create quizzes/e-exam from Google Sheets. You can set questions, test details and students details in a sheet and your quiz will be ready within 5 minutes. No programming skills required, just with your existing skills you can set this up quickly.


    


We have got 3 different versions of Dynamic Quiz. Version 1 and 2 comes with a single package and Version 3 comes with another. Have a look on below table to understand their features.

Purchase and download it now !

  $9.99
Version 1.0
$22
Version 3.0
Set questions easily in Google Spreadsheet YES YES
Display score at the end YES YES
Embed test in any sites YES YES
Exam with secure password NO YES
Storing scores in Google Sheet NO YES
Admin settings to be configured in Google sheets NO YES
Question wise analysis at the end of the test NO YES
Can conduct online exam NO YES
 

You can also learn how to create e-exams using Microsoft Excel

How you can implement this

In today's world, simplicity is required everywhere. Keeping that in mind we have created a script which fetches data from Google Spreadsheet and display them as a quiz. You just need to provide the questions and options in the spreadsheet in separate columns and let the JavaScript to do all the work. Next time when you create a new quiz simply change the questions and options in the sheet. Thats all. Keep It Simple Silly.

Advantages of this app

What advantages you will get

  • First of all you overcome the headache of dealing with complex JavaScript code
  • Writing questions and answers made easy with Spreadsheet as it is well organized and distinct
  • Maintanability greatly increases, for example if you want to add some more questions, simply add them in the spreadsheet
  • It has a great mode of flexibility, for instance if you want some questions to have only two options, then mention only two options in the sheet. JavaScript will automatically detect them and display only two
  • Your data is highly secure as they have been hosted in Google server
  • The loading time of the quiz significantly reduces as the data comes in JSON format and it is handled easily with JavaScript

54 thoughts on “Create a Dynamic Quiz Using Google Sheets and JavaScript”

  1. This is very cool, thanks. Could this be modified to give each answer a numerical score rather than just right / wrong. For example option (a) might be worth 3 points, (b) 0 points, (c) 2 points etc. Then present the score to the user at the end ?

    1. yeah, I can try it. But why you want to assign the points to each options. As I think the correct answer should always contain the points.

      1. sometimes I would like to do more of an assessent type questionairre such as “rank the usability of this site on a scale 1-5” where 1 is terrible and 5 is excellent…. those types of scenarios . Or healthy behaviours like 5 points if you exercise daily, 3 points if 3 times per week, etc

        1. That sounds great. Do you want to record their responses or simply display their score instantly on client side. I think in your first example you might need to record their responses.

    1. Hey Bobby, I found a minor bug with the JavaScript code. I fixed it just now and also have updated in Dropbox. So I request you to download the JavaScript code again and update your study guide.

    1. Tell me exactly, where you are facing the problem ? This has been tasted by many people, there should not be any issue with the spreadsheet.

      1. I honor for your response actually I am not saying any mistake in code but my point is when I done everything on google doc, copying from your file, publishing to the web and start publishing, after this I share it with public option.

        My question is from where this share key should be copied I mean from publish to the web page or share window.

        I will be really grateful to you.

        1. The spreadsheet key is always the same irrespective of places where you copy. But I will suggest you, simply open the spreadsheet and look at the URL. Part of the URL which you see after “key=” is the key.

          1. I am really thankful to you for your precious time and response, I’ve done that……I am very glad to do this.

          2. Hey, just refer to the update section present above in the post. I have upgraded the script to Version 2.0. The count down timer has been introduced.

          3. Hari – I’ve no words to thank you I just pray for your success, may God bless you and give you all that what you want in your life.

          4. Hi Dear Hari – Hoping you are doing well with the grace of God. One more idea regarding this quiz app.
            When quiz shows result I mean quiz is done it should be submitted to someone’s email address or a group.
            Any possibility please.

            Regards,

            Ali

          5. One more help is required from your side I need a countdown time on my this quiz I mean I want to place a countdown time of 10 minutes.

    1. I forgot to mention in the tutorial that you can even write HTML code in the spreadsheet as the question and hence undoubtedly you can also insert images. That is indeed a good feature.

      1. That’s awesome! I’ll try it out. thank you very much! 😀

        btw. since we can write html code in the question, does it also applies to word modification like bold, italic etc.?

      1. Thanks for providing awesome on the spot help. I am sorry to skipping instructions. Have some more ideas to make this awesome list building quiz and viral one. If you can do this.

        1. we have to record the email of user by asking in starting of quiz so that we can build a email list.

        2. We can record their answers and trigger them a mail in end with correct answer and their score.

        3. Last one is if we can ask them to make a share of their score on facebook then it can go viral in mins.

        I dont know about programming but read some thing about this. So here is my points if can be solved then we can rock the quiz world. I know these are difficult but I have faith in your that you can do one by one and with new improvements.

        Thanks in Advance.

  2. Thank you, this works great on my desktop computer in any browser. It’s on a web page in a iframe. But on Android it doesn’t load the quiz data from the Google spreadsheet, it just displays an empty quiz. Any workarounds for this?

  3. That is really great! Is there a way to track the answers? I’m planning to use this script to give real school quiz and I would like to have their answers automatically collected on another google spreadsheet. How may I accomplish that? Thanks a lot!

  4. Hi Hari,

    Thank you so much for sharing this trick, is very useful. It also works great! I was wondering how can I include a button at the end of the quiz, when displaying all results, for users to be able to go back to the beginning and re-take the quiz. Thanks for sharing

  5. Hi, This is very cool, thanks. But i need to add some shuffle and randomize. What i need is automatic chose for example 20 questions from 50. Ofcourse random question. Can u help ?

  6. Is there a way to make the page redirect and depending on how many answers you get right it will either redirect to one page if you fail and another if you pass? I need help with this please!

  7. Hi, this is really great!! Additionally, I want to show some explanation about the question after users select the answer. Could you help?

  8. is there any way to add a reset button in the end to retake the quiz without refreshing your computer?

  9. Hi, How can I replace the google spreadsheet with a javacript instead because my quiz includes equations and diagrams. What I mean is that I want my quiz to be a *.js file.

  10. Hi Hari,

    Thanks a ton for amazing stuff.

    I have a question. Is it possible to use private sheet and NOT public to do the same thing?

    Thanks,

  11. Very cool – this is so close to what I need. I would like to add one more column to the spreadsheet that would provide more info about the question to display after the answer was given.

    So instead of just “you are correct” or “you are wrong”, it would say “you are {right/wrong}.

    I imagine this wouldn’t be terribly difficult to implement, but I’m a beginning coder at best. Any suggestions?

  12. Hi hari, first, thanks a lot for quiz, and i need to make it randomize, i just need to show five questions and i have 20 questions in my spreed,

  13. This is a great job you have done here, i tried it and it worked perfectly.
    But i need to do this for a mobile App what is the code to use?

  14. Hello, I liked this quiz and want to install on my site. I perform all procedures as the tutorial, but it does not work. When I click Next to move the question simply nothing happens. I hope you have the solution. Thank you.

    1. Hi I have this same problem is there a solution (using Quiz within a Joomla site) or do I need to edit the .js file?

  15. 1) Hi, I would like to know, if it it possible, not to feedback after every single question if the answer was correct, only show the evaluation at the end of the process?

    2) Is it possible to show a short text evaluation (based on the score) insted of showng the score itself?

    Thanks and best regards.

  16. Hi Hari – kudos to your quiz script. looks great..but i have few questions:
    a) can the options for a question be interchanged
    b) can different quiz be embedded in each post in wordpress
    c) can the feedback be changed based for each question

    Regards
    Ravi

  17. Do you support option specific scoring e.g.
    What is your posture:
    Normal – 0
    Slightly stooping – 1
    Moderately stooping – 2
    Severely stooping – 3

  18. I have the Dynamic Quiz and all is wonderful. My problem is a student can open and take the exam a second time.

    Is there any way to prevent this?

    You can give me a specific line of code or tell me how. I can modify the script myself.

    Many, many thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *