【发布时间】:2018-02-28 20:20:41
【问题描述】:
Google 最近添加了在 Google Apps 脚本中编写测验的功能
var form = FormApp.create('Ice cream Quiz').setIsQuiz(true);
form.set
// Make a 10 point question and set feedback on it
var item = form.addCheckboxItem();
item.setTitle("What flavors are in neapolitan ice cream?");
item.setPoints(10);
// chocolate, vanilla, and strawberry are the correct answers
item.setChoices([
item.createChoice("chocolate", true),
item.createChoice("vanilla", true),
item.createChoice("rum raisin", false),
item.createChoice("strawberry", true),
item.createChoice("mint", false)
]);
// If the respondent answers correctly, they'll see this feedback when they view
//scores.
var correctFeedback = FormApp.createFeedback()
.setText("You're an ice cream expert!")
.build();
item.setFeedbackForCorrect(correctFeedback);
// If they respond incorrectly, they'll see this feedback with helpful links to
//read more about ice cream.
var incorrectFeedback = FormApp.createFeedback()
.setText("Sorry, wrong answer")
.addLink(
"https://en.wikipedia.org/wiki/Neapolitan_ice_cream",
"Read more")
.build();
item.setFeedbackForIncorrect(incorrectFeedback);
我希望测验的收件人自动查看他们自己的分数。我看不到如何以编程方式执行此操作。相反,我需要通过进入测验设置手动执行此操作,然后将发布等级设置为“提交后立即”,并且受访者可以看到“错过的问题”、“正确答案”、“点值”
是否可以通过编程方式设置这些?
【问题讨论】:
标签: google-apps-script google-forms google-form-quiz