I added collaborative notes documents to Google Classroom as “Students can edit file.” I did not want to push out a copy of the document to each student since the students are working in groups. This means that the collaborative document does NOT show up in the Google Classroom class folder for the student.
You can use my template to create a document that adds files to the students Google Classroom class folder or you can edit the script yourself.
Edit the template as you see fit. I press enter a LOT of times before distributing collaborative documents. This gives every student room to place their cursor.
Tip: Save this file in the folder you wish to organize it into in Drive. Copies of this document (using the makeCopies script) go into this folder.
Edit the Script
There is ONE spot in the script that you have to edit. Scroll down to find ‘Folder Name’ under the addFolder function. Replace ‘Folder Name’ with the exact spelling of the desired destination folder. Make sure the folder name is enclosed in single quotations.
Under the “makeCopies” function you can edit the name of the copied document. This is optional. The document name is defaulted to
‘GROUP ‘+i + ‘ ‘+thisTitle
The i represents the group number, do not delete this.
The “thisTitle” is replaced with the name of the document, do not delete this.
Edit the word “GROUP “. Notice the single quotations around the text string, this is important if you edit the word “GROUP .” Also notice the presence of a space in the text string.
Do not forget to save your edits in the script editor.
Close out of the script.
Attach Template in Classroom
Attach the collaborative group documents into Classroom as “Students can edit.” In the directions prompt students to use the Add-On menu to find “Add to Folder.” Pressing the button in the sidebar will add the collaborative document to their Google Classroom class folder (if you set that as the destination folder in the script.)
Code it Yourself
If you have your own Google Doc that you would like to use this script for, here is the code.
var doc = DocumentApp.getActiveDocument();
var thisDoc = doc.getId();
var pickIt = DriveApp.getFileById(thisDoc);
//CHANGE FOLDER NAME TO THE NAME OF THE FOLDER IN GOOGLE DRIVE
var folder = DriveApp.getFoldersByName(‘Folder Name’);
var classroom = folder.next();
Logger.log(‘folder name= ‘+classroom.getName());
Copy and paste the above script into the script editor of any Google Docs text document you have. Modify the script to adjust to your needs.