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.
In the Google Document you can go to the tools menu and choose “Script editor.” This allows you to set up what folder the document saves into.
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.
Using the Add-On menu “Add to Folder” in the document, click on the 2nd button “Create copies.” You will be prompted for how many groups you want to create a copy for.
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.
5 thoughts on “Google Classroom: Add Other Documents to Class Folder”
Alice This is an intriguing workflow and one that hopefully Google can adapt to the official Classroom options!
I’ve been doing a lot of thinking about how to assign GROUP work in Google Classroom since most of my students work in Groups. Currently I’ve been using “Make a COPY” option and asking one person to become the GROUP Leader/Captain and sharing the document with the rest of the group and then having the other students WRITE on the top of their copy – I’m in the group with (…name other group members… and adding a link to the official group document) Kind of a pain
If doctopus or Alice Keeler script can have a group workflow.. hopefully Google Classroom can streamline this process also.
BTW…. if anyone can put a BUG in Google Classroom team to ad a “REVERT TO DRAFT” button for the Assignments… please please do… seems like an easy fix to copy the code from Blogger.. revert to draft)
You must log in to post a comment.