Google-apps-script – Google Apps Script with forms to check if a doc url is ‘shared’

google-apps-scriptgoogle-forms

Does anyone know "IF" it is possible to use Google Apps Script with a Google form to auto check "IF" a document URL pasted into the form is a "shared" document?

I'm a teacher and I use Google forms to collect student work, but one of the biggest problems I experience is that students regularly submit url's to "unshared" documents for grading. I'd like to reduce/eliminate this by the form checking the entered document url to see if it is 'shared' befor the form is submitted.

Is this possible? If yes, can someone please point me in the right direction?

Here is the form I'm currently using.
http://mrbenrud.com/index.php/2012-09-08-21-09-45/submit-your-work

Best Answer

The answer validation in Google Forms could be done with Google Apps Script after the students submit their responses, i.e. by using onFormSubmit event.

Once the answer was submitted, you could use the Class File to get properties like:

  • Viewers
  • Editors
  • Owner

It's worth to say that in the 2014 summer Google launched Google Classroom to help teachers to manage the assignments of their classes among other tasks.

References

Validate answers in your form - Docs editors Help