Google apps script 以编程方式允许在Google Apps脚本中查看测验中的分数
谷歌最近增加了在谷歌应用程序脚本中编写测验的功能Google apps script 以编程方式允许在Google Apps脚本中查看测验中的分数,google-apps-script,google-forms,google-form-quiz,Google Apps Script,Google Forms,Google Form Quiz,谷歌最近增加了在谷歌应用程序脚本中编写测验的功能 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?"); i
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);
我希望测验的接受者能够自动查看自己的分数。我不知道如何通过编程实现这一点。相反,我需要在测验设置中手动执行此操作,然后将发布等级设置为“提交后立即”,受访者可以看到“遗漏的问题”、“正确的答案”、“分值”
是否可以通过编程方式设置这些选项?以前曾问过这个问题(但我的答案尚未被投票或接受,因此我无法将其标记为重复)。这是我建议的解决方法: AFAIAA,目前还没有办法直接使用Google应用程序脚本方法来实现这一点 一个可能的解决方法是创建一个最小的Google表单,将其设置为测验,并将其配置为“每次提交后立即”。不要在脚本中创建表单,只需复制此表单文件(使用脚本)并继续在副本中以编程方式构建测验 值得注意的是,Google Apps脚本中的这一遗漏可能会导致完整测验中出现错误。当使用脚本创建表单并使用.setisquick(true)方法将其转换为测验时,“释放标记”设置默认为“稍后,手动审阅后”。在“表单设置”用户界面中,此选项包括“打开电子邮件收集”注释-这样,当手动发布结果时,会有一个电子邮件地址将结果发送到。使用上述步骤创建测验时,不会启用电子邮件收集。这意味着不可能手动发布结果。上述解决方法缓解了此问题