Release grade immediately after submission - how to do using Apps Script

夙愿已清 提交于 2019-12-08 02:13:15

问题


I am using the following lines of Apps Script to dynamically generate a Google Forms Quiz

 form.setIsQuiz(true);
 form.setTitle("New")
 .setDescription('Test')
 .setConfirmationMessage('Thanks for responding!')
 .setAllowResponseEdits(false)
 .setAcceptingResponses(true)
 .setLimitOneResponsePerUser(true)
 .setShuffleQuestions(true)
 .setProgressBar(true)
 .setCollectEmail(true)

This is creating a form and i am able to send out the quizzes to multiple people. But i also want to "Release Score >> Immediately After Submission". This is a feature in Google Quiz Form. But i am unable to find a method equivalent to the Google Forms feature of "Release Score >> Immediately After Submission".

I cannot do this manually for each form because i generate hundreds of forms distributed to different sets of people.


回答1:


AFAIAA, there is no means to do this directly using a Google Apps Script method at this time.

A possible workaround is to create a minimal Google Form, make it a quiz, and configure it to 'Immediately after each submission'. Instead of creating the form within the script, merely duplicate this Form file (using your script) and proceed to build your quiz programmatically in the copy.

It is worth noting that this omission in Google Apps Script can result in a bug in the completed quiz. When a Form is created using a script and .setIsQuiz(true) method is used to to turn it into a quiz, the "Release marks" setting defaults to "Later, after manual review". In the Forms settings User Interface, this option includes the note "Turns on email collection" - This is so that when results are released manually, there is an email address to send the results to. When a Quiz is created using the steps above, email collection is not enabled. This means it is not possible to release the results manually. The workaround described above alleviates this issue.



来源:https://stackoverflow.com/questions/44471090/release-grade-immediately-after-submission-how-to-do-using-apps-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!