Sonic007 Posted May 23, 2024 Posted May 23, 2024 Hi everyone, We use GSuite (Google for Education) and have several Google Classroom classes where the teachers have not archived the old classes or the teachers have now left. I would like to find a way to delete these old classes as students are using them as chat rooms and to post irrelevant content. Is there a way to do this? Thankyou.
jthompson Posted May 23, 2024 Posted May 23, 2024 (edited) I suspect GAM will be the way forward there, making use of its CSV batch commands. https://gamcheatsheet.com/GAM%20Cheat%20Sheet%20A3.pdf You'll need to run some commands in order to gather the course IDs that you will then need to list in a CSV file to archive or delete them. With a list of target course IDs in a CSV file with a column named "courseID", you'd run the following to archive them all: gam csv coursesToArchive.csv gam update course ~courseID status ARCHIVED Edited May 23, 2024 by jthompson 2
timbo343 Posted May 23, 2024 Posted May 23, 2024 So going through around 600 classes manually adding #{year} to the beginning of each class isn't the best way? [emoji854] 1
Sonic007 Posted May 23, 2024 Author Posted May 23, 2024 @jthompson Thankyou. I will definately look in to this.
DavR Posted May 23, 2024 Posted May 23, 2024 I can't find a copy of it online now, but not being very au fait with GAM, I use Alice Keeler's Google Classroom "List classes" management scripts. They're built into a Google Sheet and run as add ins. It's made administering our Google Classrooms so much easier, I don't have to be an admin in each class to do things, just an admin in our Workspace tenant. 2
highsky Posted May 24, 2024 Posted May 24, 2024 Gam if it's your thing. ClassRight was quite handy for bulk tasks, free: https://www.goldyarora.com/guides/classright And he has more for workspace: https://www.goldyarora.com/apps 1
timbo343 Posted May 24, 2024 Posted May 24, 2024 (edited) gam print courses teacher [email protected] state active todrive > this outputs the list to a Google Sheet I download the google sheet to my machine and add a new column, NewName to the end of the columns. Save the document and run gam csv C:\gam\Rename2023_24courses.csv gam user [email protected] update drivefile "~teacherFolder.id" newfilename "~NewName" > for gam to tell me "ERROR: 1k1rtg4ks4j3ulitj-8vwp8r2iwrsqa784vnqmpwyohqqm7m6x2ojgi4bqm8f3mklow9mhyf is not a valid argument for "gam update drivefile" " - what's this error all about? Edited May 24, 2024 by timbo343 1
jthompson Posted May 24, 2024 Posted May 24, 2024 I can't work out what you're trying to do there. Your first gam command makes sense (fetching a list of active courses owned by a particular teacher). What are the other two attempting to do?
timbo343 Posted May 24, 2024 Posted May 24, 2024 I can't work out what you're trying to do there. Your first gam command makes sense (fetching a list of active courses owned by a particular teacher). What are the other two attempting to do? I'm trying to rename classes in bulk and Gam is peeing me off! After i've downloaded the courses i would take a copy of the Google Sheet and make a new column called NewName. I got this sample from a Google Group: Sample: $ gam print courses teacher [email protected] >courses.csv Add a new column, NewName, to tscourses.csv $ gam csv courses.csv gam user "~ownerId" update drivefile "~teacherFolder.id" newfilename "~NewName" But i cannot work out how to change the classname.
timbo343 Posted May 24, 2024 Posted May 24, 2024 Sorted it! gam csv "path to csv on local computer" gam update course "~id" name "~NewName" Used this to help me out: https://sites.google.com/jis.edu.bn/gam-commands/services/classroom#h.lbrsab3c0kgj
jthompson Posted May 24, 2024 Posted May 24, 2024 That looks better, yep. Pretty much everything Classroom related will rely on you giving it a course ID to work with. The cheat sheet I linked to earlier is handy for determining what commands and parameters you need to put together.
jthompson Posted May 24, 2024 Posted May 24, 2024 Also, as an aside, I'd recommend installing gam into Google Cloud Shell and running it from there. You're not then having Google Workspace superadmin credentials sitting in a JSON file on your computer! 1
Primus Posted May 24, 2024 Posted May 24, 2024 Also, as an aside, I'd recommend installing gam into Google Cloud Shell and running it from there. You're not then having Google Workspace superadmin credentials sitting in a JSON file on your computer! This is the way.
timbo343 Posted May 24, 2024 Posted May 24, 2024 Also, as an aside, I'd recommend installing gam into Google Cloud Shell and running it from there. You're not then having Google Workspace superadmin credentials sitting in a JSON file on your computer! I looked at trying to do that but i gave up - is it actually easy to do as it would make life so much easier?
jthompson Posted May 24, 2024 Posted May 24, 2024 I used this guide originally, and just dropped my existing JSON/credentials bits into place. https://basuta.com/posts/installing-google-apps-manager-gam-on-google-cloud-shell/ 1
timbo343 Posted May 24, 2024 Posted May 24, 2024 I used this guide originally, and just dropped my existing JSON/credentials bits into place. https://basuta.com/posts/installing-google-apps-manager-gam-on-google-cloud-shell/ Ta, will take a look.
jthompson Posted May 24, 2024 Posted May 24, 2024 Just noticed that it's from 2018, so quite a few years ago, and I'm running GAMADV-XTD3. I think a more up to date guide might actually be this one - https://taming.tech/installing-gamadv-xtd3-on-google-cloud-shell/ They also describe a nice one-line method to upgrade the isntalled version GAMADV-XTD3 to the latest - https://taming.tech/upgrading-gamadv-xtd3-macos-linux-cloud-shell-windows-easily/ 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now