google-apps-script - 使用 Google Apps 脚本在 Google 表单中设置正确答案(已定义为测验)

标签 google-apps-script google-forms google-form-quiz

我正在尝试使用 Google Apps 脚本在 Google 表单(已定义为测验)中设置正确答案

可以使用如下代码定义实际的 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'),
        item.createChoice('Mustard'),
        item.createChoice('Relish')
    ]);

(摘自https://developers.google.com/apps-script/reference/forms/)

有没有办法在代码中定义正确答案并为其分配分数?

我知道这可以手动完成...

最佳答案

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


目前没有设置正确答案的方法。请star issue 6143 : 通过 API 创建测验表单

关于google-apps-script - 使用 Google Apps 脚本在 Google 表单中设置正确答案(已定义为测验),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39603541/

相关文章:

google-apps-script - 如何从 HTML 服务中的列表框获取值

google-apps-script - 表单上的应用程序脚本如何将额外数据存储到工作表中?

android - 如何在 Android 应用程序中使用 Google 表单?

google-apps-script - 清除第二天表单条目上的脚本错误

google-apps-script - 谷歌应用程序脚本(谷歌表单)中的pagebreakitem和sectionheaderitem有什么区别?

google-apps-script - 在 Google 测验表单之间复制项目 .getFeedbackForCorrect

google-apps-script - 如何使用 Google Apps Script 将 CSS 页面更改为具有内联样式的页面?

google-apps-script - Google Apps 脚本 - 在 Google 幻灯片表格中插入图片

google-apps-script - 如何使用应用程序脚本删除特定单元格?

javascript - Google Sheet 脚本 - 如果找到单元格值则返回标题值