使用Google Apps脚本在Google表单(已定义为测验)中设置正确答案 [英] Using Google Apps Script to set the correct answer in a Google Forms (that has been defined as a quiz)

查看:340
本文介绍了使用Google Apps脚本在Google表单(已定义为测验)中设置正确答案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

可以使用诸如

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/参考/表格/)

有什么办法用代码定义什么是正确的答案并为其分配分数?

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...

推荐答案

更新:2017年4月,Google 宣布,现在可以通过程序创建Google表单测验了.

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


目前,没有一种方法可以设置正确的答案.请为问题 6143 加注星标:通过API创建测验表单


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

这篇关于使用Google Apps脚本在Google表单(已定义为测验)中设置正确答案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆