Using Google Apps Script to set the correct answer in a Google Forms (that has been defined as a quiz)

南楼画角 提交于 2019-12-25 07:59:57

问题


I am trying to use Google Apps Script to set the correct answer in a Google Forms (that has been defined as a quiz)

The actual Google Form can be defined using code such as

var form = FormApp.create('New Form');
var item = form.addCheckboxItem();
item.setTitle('What condiments would you like on your hot dog?');
item.setChoices([
        item.createChoice('Ketchup'),
        item.createChoice('Mustard'),
        item.createChoice('Relish')
    ]);

(Taken from https://developers.google.com/apps-script/reference/forms/)

Is there any way in code to define what actually the right answer is and to assign it points?

I know this can be done manually...


回答1:


UPDATE: On April 2017 Google announced that now it's possible to create Google Forms quizzes programmatically.


At this time there isn't a method to set the correct answer. Please star the issue 6143: Create Quiz Form via API



来源:https://stackoverflow.com/questions/39603541/using-google-apps-script-to-set-the-correct-answer-in-a-google-forms-that-has-b

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!