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.
Start your Apps Script project with a new Blank Project (just double click Blank Project to start). Click the Untitled project text 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:
NOTE: There is a US version of this code on GitHub https://github.com/charlielove/GoogleClassroomToCalendar/tree/US-patch-1
Remember to click Save (in the file menu or the disc icon!).
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.com and 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!
This code is available on Github at https://github.com/charlielove/GoogleClassroomToCalendar
TeachComp1
RT @charlie_love: Google Classroom Assignments to Calendar: Services such as “Show MyHomework” provide a calendar of homewo… http://t.co/…
ScotEduBlogs
ScotEduBlogs: Google Classroom Assignments to Calendar http://t.co/yVf9v48coa
goodonskis
RT @charlie_love: Google Classroom Assignments to Calendar: Services such as “Show MyHomework” provide a calendar of homewo… http://t.co/…
Show My Google Classroom | Learning Technologies Team
[…] This code is available on Github at https://github.com/charlielove/GoogleClassroomToCalendar and the technical details of the set up (if you are interested) are available here. […]
MrCaffrey
Google Classroom Assignments to Calendar | Charlie http://t.co/dkmHS8DbbJ http://t.co/aaB5ZJ614Q
mrcaffrey
Thats much better than the one I wrote! – Thanks – I will be using this version..
Google Classroom to Google Calendar (via a Sheet) | Mr Caffrey
[…] Pingback: Google Classroom Assignments to Calendar | Charlie Love.org […]
Charlie Love
Thanks for your work on this. It really helped me get started (and there is a lot of your code in here!!) I’ll be posting updates on the Github. Already found that the default event is a Video Meeting so need to change that for notifications.
chrisrogers07
Google Classroom Assignments to Calendar http://t.co/YlzTrk7jLa
midschoolsci
Until Google Classroom comes out with calendar integration here is the hack and script to make it happen http://t.co/0rI5iseQY7 #GAFE
builtbyteachers
RT @midschoolsci: Until Google Classroom comes out with calendar integration here is the hack and script to make it happen http://t.co/0rI5…
happiestteacher
RT @midschoolsci: Until Google Classroom comes out with calendar integration here is the hack and script to make it happen http://t.co/0rI5…
midschoolsci
@charlie_love absolutely thank you for sharing your work! Google Classroom assignments to calendar script http://t.co/0rI5iseQY7
KelleyJAndrews
RT @midschoolsci: Until Google Classroom comes out with calendar integration here is the hack and script to make it happen http://t.co/0rI5…
PatriciaNelle
RT @midschoolsci: Until Google Classroom comes out with calendar integration here is the hack and script to make it happen http://t.co/0rI5…
ShanaVWhite
RT @chrisrogers07: Google Classroom Assignments to Calendar http://t.co/YlzTrk7jLa
coachhoup24
RT @midschoolsci: Until Google Classroom comes out with calendar integration here is the hack and script to make it happen http://t.co/0rI5…
jasperfoxsr
New bookmark: Google Classroom Assignments to Calendar http://t.co/V7q8TaTqea
aleixa
Google Apps Script for sending Google Classroom Assignments to Calendar: http://t.co/cxewZSZu3l #edtech #GAFE #WELSTechConf
Mr_Svoboda
Awesome hack! –> Google Classroom Assignments to Calendar http://t.co/QFa3ZQpd90 #googleedu #gafe #edtech
builtbyteachers
RT @Mr_Svoboda: Awesome hack! –> Google Classroom Assignments to Calendar http://t.co/QFa3ZQpd90 #googleedu #gafe #edtech
synergyse
Great use for Google Apps Script! –> Google Classroom Assignments to Calendar | Charlie http://t.co/slF4Mh6lLx http://t.co/wMALgStLD8 #gafe
BurgerKatie
RT @Mr_Svoboda: Awesome hack! –> Google Classroom Assignments to Calendar http://t.co/QFa3ZQpd90 #googleedu #gafe #edtech
rpetitto
#GoogleClassroom Assignments to Calendar | Charlie http://t.co/dnumjD3e2E http://t.co/6A0ML5RQUu #GAFE
Ryan7Read
RT @rpetitto: #GoogleClassroom Assignments to Calendar | Charlie http://t.co/dnumjD3e2E http://t.co/6A0ML5RQUu #GAFE
alrickels
Google Classroom Assignments to Calendar | Charlie http://t.co/q6RGxVOpmg http://t.co/LjPciagYdr
pewithmrt
Has anyone tried to set this up yet? It isn’t working for me. #GAFE Google Classroom Assignments to Calendar http://t.co/aHiNebDD7x
Charlie Love
Hi David,
Check your Filter rules are tagging assignment emails as Classroom. It will only work for new assignments (unless you manually tag older emails). Also, check you have enabled the permissions for the Apps Script to access Gmail/Drive etc. It uses the default calendar for the user rather than an additional calendar hence why it needs a specific user account to be created. You can use Apps Script debugging to check what is happening.
Hope that helps.
Charlie
Google Classroom: What It Is – And What It’s Not | DViS: Shift happens
[…] A: Nope. Would definitely make good sense, though, so expect this one to pop up, too. While we’re waiting: check this workaround. […]
Jeremy Mitchell-Koch
This is a great help! I have followed the steps, but have run into an issue. The assignment is placed into the spreadsheet, but it never shows up on the calendar? In the App Script there are 3 functions to choose from (left of the bug)…is this why there is a problem? Thanks for any help or suggestions.
–Jeremy
Charlie Love
Hi Jeremy,
The assignments are added as whole day events to the calendar. It is the the ClassroomToCalendar function that you should run in the AppsScript debug. The Script removes the tag on the emails when it finishes AND changes the items in the spreadsheet so that they won’t be added a second time to the calendar. If you want to re-run the script for testing you need to reflag the classroom emails in Gmail, delete the Spreadsheet called “Classroom Assignments” in drive and check the calendar (best done in Agenda view) and remove any events the script added. You can then rerun the script. I’ve just tested the code again and it is working as given. I hope this helps you.
Charlie
Bob Schmidt
Having the same issue as Jeremy. Everything seems to work except nothing shows up on the calendar. I debugged the script and noticed that everything was being posted a year later than it should. All my assignments were in the calendar exactly a year later than they should have been.
Bob Schmidt
update to my last comment. On our system, the day and month values in stringStartDate are in a different order. The day is first in the array, and the month is second. I had to switch the following:
var calDay = calSplit[1];
var calMonth = calSplit[0].substring(0,3);
Also, calDay also sometimes had a “<" in it for single digit dates. The calDayVal was still evaluated correctly so I had to change deadline to use "String(calDayVal)" instead of calDay.
Now it seems to work.
Charlie Love
Great news Bob, I guess this a difference between the UK date displayed in Classroom and the US date. Thanks for your fix! I’ll have a look and see if I can amend the script to detect the format and process it accordingly.
pewithmrt
@charlie_love awesome, I know I have to do something,but have no clue what…
tracieezell
RT @midschoolsci: Until Google Classroom comes out with calendar integration here is the hack and script to make it happen http://t.co/0rI5…
RenedeKoeijer
Google Classroom Assignments to Calendar http://t.co/TOJyINQfuj
charlie_love
RT @RenedeKoeijer: Google Classroom Assignments to Calendar http://t.co/TOJyINQfuj
bpugh2
I keep getting this error message whenever I run the script (ClassroomtoCalendar):
“This operation can only be applied to at most 100 threads.(line 101,file””) Dismiss.
Have I done something wrong?
Charlie Love
Hmmm, check how many emails are tagged with “Classroom” in Gmail – that could be the source of the error. Manually untag them and then retag in batches to put in your calendar. The script is designed to check the notifications every hour – there is a limit on the number of messages that AppScript can process in this manner which you may be hitting.
Charlie Love
Also check which version of the script you are using. There is a UK/EU one and a US one. The date format in the US notification emails is different from the UK/EU one. I don’t know which format is used in the Canadian version.
bpugh2
I have only 3 emails tagged as classroom. Also, the time for the script is (GMT-5:00) Eastern Time. (We’re on EDT in Toronto.
Thank you, Brian.
Charlie Love
Brian, is the date in the notification emails: 25 Jul or Jul 25? This affects which version of the script to run.
bpugh2
Except for the one generated this morning, they were all dated July 12. Would that date make any difference?
Thank you, Charlie. I really appreciated your help!
Brian.
Charlie Love
Are there over 100 emails in the inbox?
bpugh2
634! Read and not read. Is this the problem? Can I do anything short of deleting all by 90 or so?
Charlie Love
Can you test this for me. In the script please change the line (around 99)
var threads = GmailApp.getInboxThreads();
to this one
var threads = GmailApp.search(‘label:Classroom’);
and let me know if that works.
kirkhinton
Any objections to this being forked and modd’ed?
Charlie Love
None at all. Please let me of improvements and I’ll also update the core code.
#Google #Classroom for building Digital Citizenship | Caffeine Tangent
[…] school are also keen to use Classroom for issuing homework tasks (must investigate Charlie Love’s calendar script for broadcasting this from a central calendar) so I delivered an introductory demo to staff just a […]