5

I wrote a google spreadsheet script that parses a spreadsheet and creates a form with the data.

Once the form is created, I can manually go to the form settings -> Quizzes and then "make this a quiz". Once I make it a quiz, I can manually assign points and a correct answer to each problem.

Does anyone know a way to script this when creating the form? Specifically, in my google spreadsheet, my script uses FormApp to create the form and add questions. When the script creates the form, I want to add the setting "make this a quiz", and when the script creates each questions, I want to set the answer key and assign point values. I am not sure this ability exist as I could not find it in the FormApp class.

Thank you

Rubén
  • 34,714
  • 9
  • 70
  • 166
  • I don't see any method to make the Form a quiz. I'm quite sure that it's not available at this moment. When I did a search on "quiz" there was nothing found in the documentation. – Alan Wells Jul 23 '16 at 14:03
  • I'm guessing that your option in the form to 'make this a quiz' comes courtesy of an add on from a third party that you've installed? Do you know the name of it? – phollingdrake Jul 25 '16 at 11:14
  • Sandy, thank you for your comment, I think you are correct, I can not find anything in the documentation either. Phollingdrake, it is not a add on. Look under the gear looking "settings" icon in the form. You can manually set it there. – Peter at MUIC Jul 27 '16 at 03:22
  • Possible duplicate of [Where can I find documentation on Google script functions for features introduced in June 2016 Google forms update](https://stackoverflow.com/questions/38998570/where-can-i-find-documentation-on-google-script-functions-for-features-introduce) – Rubén Jan 08 '18 at 03:00

1 Answers1

1

On April 27, 2017, Google added many new Google Script methods for handling Forms. The announcement is on the G Suite Developers Blog: Create Quizzes in Google Forms with Apps Scripts Among the additions is the isQuiz() function, which allows you to set the form as a quiz. The documentation (although very brief) is at the Google Developers site. The Developers Blog has a detailed explanation (with sample code) of how to create a quiz using Apps Script.

Ike
  • 109
  • 3
  • 10