Google apps script 使用Google Apps脚本在Google表单中设置正确答案(已定义为测验)
我正在尝试使用谷歌应用程序脚本在谷歌表单中设置正确答案(已定义为测验) 可以使用以下代码定义实际的Google表单Google apps script 使用Google Apps脚本在Google表单中设置正确答案(已定义为测验),google-apps-script,google-forms,google-form-quiz,Google Apps Script,Google Forms,Google Form Quiz,我正在尝试使用谷歌应用程序脚本在谷歌表单中设置正确答案(已定义为测验) 可以使用以下代码定义实际的Google表单 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
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')
]);
(摘自)
在代码中是否有方法定义正确答案并给它打分
我知道这可以手动完成
更新:2017年4月,谷歌宣布现在可以通过编程方式创建谷歌表单测验
目前还没有一种方法来设置正确的答案。请启动问题:通过API创建测验表格副本
6.// Make a 10 point question and set up the question
7. const item = form.addCheckboxItem();
8. item.setTitle("What flavors are in neapolitan ice cream?");
9. item.setPoints(10);
11.// chocolate, vanilla, & strawberry are the correct answers
12. item.setChoices([
13. item.createChoice("chocolate", true),
14. item.createChoice("vanilla", true),
15. item.createChoice("rum raisin", false),
16. item.createChoice("strawberry", true),
17. item.createChoice("mint", false)
18. ]);
TextItem不支持此API