Archiving Classes in Google Classroom with teachers who have left

Dave_Burek
New Contributor III

From our Tech Coach.  I never work in or on Classroom things so I have no idea. Is it possible to archive classes as an admin or no?

"Archiving Google Classrooms of teachers who are no longer here/active.

Old classrooms still show up on our kids' Google Classroom screen even if the teacher's account has been deleted and it goes back years.

For example- a Senior who has been here since middle school will see every single classroom in their Google Classroom screen if that teacher did not achieve the class at the end of that school year."

6 REPLIES 6

rdnixon
Contributor

You can use GAM to archive them. So gam update course courseid status ARCHIVED

You can get a list of classes by running: gam print courses todrive

You can get course of a student: gam print courses student studentemail todrive

I'd strongly recommend automating the creation and suspension of classes and adding a "system" account to all classes as the class owner.

Dave_Burek
New Contributor III

That is pretty awesome! I have never used GAM before and actually wanted to avoid it. But, I actually have been able to get it up and running on Linux on my Chromebook and it seems to at least be running the reports. I haven't archived anything yet but when I get more info from the school will give that a go.
Be prepared for really stupid GAM newbie requests now.
Can I do multiple courses or could I archive all courses that are owned by a particular teacher?

Hi Dave,

Yes, you can run a commmand like below, where the Google Sheet has a list of Course IDs (~id). And to get this Google Sheet, you can add todrive to a print commmand to save the output to Google, rather then a CSV.

gam csv gsheet <Owner Email Address> <File ID> <Sheet Name> gam update course ~id state archived

My recommenation would be to use GAMADV-TXD3 as it has more options than standard GAM. https://github.com/taers232c/GAMADV-XTD3/wiki#installation---upgrading-from-a-gam-version-other-than....

This Google Group is very helpful and supportive https://groups.google.com/g/google-apps-manager

Cheers

James

Yes, the support from the group and the two developers is amazing.

For more acute needs, there's even a Chat Space where you can ask questions.

https://git.io/gam-chat

 

--
https://wheretofind.me/@NoSubstitute

Bill_Gibson
Contributor III

We archived all but a handfull of Classrooms (Band, Sports, etc) for the first time over the summer.

We timed it just right and it was a great experience for staff, students, and admins; easy for staff to restore any classes that they still needed.

Kim_Nilsson
Admin Moderator

Important note: If the owner account has been permanently deleted (deleted more than 20 days ago), there is less management possible. If it's within the 20 days, you can temporarily restore the account, and then have full management of the course. Afterwards, delete is the only option.

For recently deleted users (less than 20 days), you can't even print their specific courses.

gam print courses teacher username

This will come back with an "invalid argument" for deleted users.

So you will have to print all courses, which may take a very long time, depending on how many courses you have, and how many such deleted owners you have. Each unknown owner causes a significant delay in the process.

For that specific purpose I created a script to only list courses with unknown owners, so called orphaned courses.

#!/bin/bash
# Add a dated sheet to the file Orphaned Classrooms with Classrooms without owner in my Workspace
GAM="/Users/kim/gamadv-xtd3/gam"
$GAM select lomma save
$GAM redirect csv ./CourseIDs.csv print courses fields id
$GAM config num_threads 30 redirect csv - multiprocess todrive tdfileid SheetIDhere tdtitle "Orphaned Classooms" tdtimestamp true tdsheet "" tdaddsheet tdsheettimeformat %Y%m%d csv ./CourseIDs.csv gam print courses course "~id" fields id,name,owneremail,teachers owneremailmatchpattern "Unknown User"
$GAM select default save

The list is added to a Sheet I keep for managing orphaned Classrooms. It still needs to print all courses, but it filters the list to only unknown owners and pushes that data to the Sheet.

Since the data adds up, you may have to create a new one after a few years; depending on the size of your Workspace you may hit the 10M cells limitation.

The data will also list secondary teachers, so I have someone to reach out to and ask whether it's ok if I delete the course, as that is the only viable option when the user is permanently deleted.

Last I checked, you can't manage the course in any other way at that time. Delete is the only option.

Yes, I use a very high number of threads for this command, and that's because running the command in sequence and not parallel would take forever, and experience have shown that even though you almost immediately run into quota delays, the total time spent will be lower with this number of threads. I haven't tested max number of threads, as it is taxing on the computer, and I want to be able to do other things in the meantime.

--
https://wheretofind.me/@NoSubstitute