3
votes

It is straigt forward to include the answer keys for a multiple choice question , as evident from following code.

var item = Form.addCheckBoxItem();
item.setTitle("What is 1 + 2?");
item.setChoices([item.createChoice("1", false),
                 item.CreateChoice("2",false),
                 item.CreateChoice("3",true)

I am looking a similar function for text item questions. something similar

var textitem = Form.addTextITem()
item.setTitle("What is the capital of Japan?")
item.setAnswer("tokyo")  //  looking for something similar

I am aware that I can create an add-on , that dynamically check the submitted response against the answer-keys stored in a spreadsheet . But is there any simple way to hard code the answers for the text questions in the form itself?

1

1 Answers

1
votes

EDIT - Sorry I completely misread your question. No, it is not possible to have automatic grading for short answer or paragraph type questions.

It is possible, as you said, to use an add-on like Flubaroo to grade text questions but if you have tried this you will quickly realise how many answer variations people can give for even a 1 word answer!

I did this before and ended up manually grading the answers anyway, things like capitalisation, white spaces before and after the word etc, etc, etc all need to be taken into account.

var textitem = Form.addTextITem()
    item.setTitle("What is the capital of Japan?")
    item.setAnswer("tokyo")

Take your own example, if you sent the answer as tokyo then Tokyo would be considered incorrect when it is actually correct and tokyo could be correct too if you're not marking on the spelling.