Google Classroom Assignments to Calendar

Services such as “Show MyHomework” provide a calendar of homework allocated to pupils and classes by their teachers. These simple tools allow files to be attached to homework but require the files to be download to be completed and printed in a traditional manner. These tools do not integrate the allocation of assignments/tasks with the tools to carry out the work and depend on the learner having access to the required software to complete the task (and perhaps a printer to transfer it to paper for the teacher!).

It would be great if you could integrate the calendar of assignments with the tools to complete the task AND provide a publicly viewable calendar that parents could view to see the work allocated to their child’s classes in a service that would handle all of the complexity of sharing permissions, copying files etc. for you.

Recently, I’ve been working with Google Apps for Education and particularly Google Classroom. I’ve received numerous requests for a public calendar of homework so I set about creating just that! I started reviewing the work at Mr Caffery’s Blog which was a good start but actually contained a number of bugs and I have revised and improved his work. This article is intended for Google Apps for Education Administrators but feel free to give it a go 🙂 .

Setting up Gmail, Apps Script and Calendar

Create a user in your Google Apps Domain for the public calendar. You need one user for each publicly viewable calendar. If your domain covers a number of schools then create a user for each school (myschool1@mydomain.org, myschool2@mydomain.org etc.).

This user needs to be added to every classroom that will be included in the calendar. Teacher’s can invite the user and then the user has to accept the invitation or the user can just join the class in the normal way with the class Joining Code.Go to https://classroom.google.com and signup, using this user calendar user account, to your class / classes using the class code(s) or go to https://mail.google.com and accept the invitations to the classes.

When assignments are set, an email is sent to each user in the classroom. Our user account is going to filter these emails when they arrive and label them with a new label of “Classroom”.Go to https://mail.google.com. Sign in using your Calendar User Account. Click the settings cog (in the top left of the screen normally) and choose settings. Click Filters and then Create new filter. The Filter pop-up will appear.

When a email is received from Google Classroom it starts with the text “New Assignment…” in the subject line. Type New Assignment* into the Subject box – the * is a wildcard which means that anything can appear after the text New Assignment.

Then click Continue.On the next page of the popup, tick the box “Apply the label” then click in the pull down menu and then click New label. A new popup will appear. Under “Please enter a new label name:” enter Classroom then click Create.Finally, click Create filter.

Any new email sent which starts with “New Assignment” in the subject line will be labelled with “Classroom”. This is how we’ll pick out the Google Classroom emails from the others.

Now to add the Google Apps Script.Still logged in as your Classroom Calendar user, go to https://drive.google.com and open up your Google Drive.In Google Drive, click New and then more > and then Google Apps Script.If you haven’t used Apps Script before you’ll have to add it using ” + Connect more apps”.

If you are adding it, just enter Apps Script in the search box of the popup that appears when you click “+ Connect more apps” and it should be the top result. Just click the + Connect to add it. Once added it will appear in the New menu as described above.

Connecting Google Apps Script to your Google Drive

Adding the Apps Script application to your Google Drive

Start your Apps Script project with a new Blank Project (just double click Blank Project to start). Click the Untitled projecttext in the top left and call it ClassroomToCalendar (just something to remember what it is!). Then replace any code in the Code.gs window with the following:

Click the triangular play button next to the image of a bug. The script will run and will request access to your drive, mail and calendar. Allow this or it will not work.

You’ll want the script to run every hour to add new assignments to the calendar. To do this we use the Resources menu. Click Resources and then All your triggers. Click Add a new trigger and enter the following details.And then click Save.

Making the calendar public. Finally you’ll need to go to http://calendar.google.comand choose the menu from your calendar user’s default calendar.Click calendar settings and then give the calendar a suitable name (something like “All School Homework”) and click Save.

Now go back into the same calendar settings and click Share this Calendar. Click the tick box for Make this calendar public and select the option See all event details. Click Save to store this setting.

Finally, you’ll want to embed the calendar or share it via a link. Go back into the same calendar settings as before and there will be some code to Embed This Calendar in a web page and details of the Calendar Address – use the HTML one get a link to share with parents/carers (you could use a shortlink creator like http://bit.ly to generate a short version of this link).

The final calendar embedded looks like:

It adds the name of the class followed by the activity to the Calendar entry and includes the name of the main class teacher in the Description. Job done 🙂

The beauty of this solution is that you only need the calendar user to be added to each classroom. Other than this initial setup there is no further complex technical stuff to do!

HELP ! I have tried setting up my google classroom to google calendar but it has an error on line 28 it says:-TypeError: Cannot read property “1” from null. (line 28, file “”) I confess I know nothing about computer code. Can you help

Interesting idea but why not just create a class in Google Classroom for JUST the homework that you want to be public, then ask teachers to add the larger assignments (tests etc.) to that course. They just tick the box to add the assignment not only to their class but also to the “homework” class. Then you could just edit the share settings on that “homework class” calendar to be public. What am I missing?