Jump to content

add a default owner / account to all classrooms in Google?


Recommended Posts

Posted

Hi there

 

Is there a way to add a teacher / owner (ie an IT admin account) to ALL classrooms in Google?

 

I am playing with GAM, so if doing through Google Admin is not possible, then can I run a command in GAM?

 

 

Thanks ! :)

Posted (edited)

You'll have to use gam for this. I haven't tested or used this command:

 

gam print courses status ACTIVE | gam csv - gam course ~id add teacher [email="[email protected]"][email protected][/email]

 

If this doesn't work you can print all courses to csv:

gam print courses > C:\location.csv

 

Then create a powershell script to loop through the csv file which will contain the ID number of each course

$list = Import-Csv -Path "c:\location\of\csv.csv"

cd C:\GAMADV-XTD3

foreach ($entry in $list){ 
.\gam course $($entry.id) add teacher [email protected]     
}

 

EDIT:

I just found there is an owner command too. What I've posted will just add the user as a teacher. If you want them to be owner you can add:

gam update course owner

 

Edit:

Changed command to only use active classes as it will error on adding users to archived classes as pointed out by gh5000 below.

Edited by RLR
  • Thanks 1
Posted
You'll have to use gam for this. I haven't tested or used this command:

 

gam print courses | gam csv - gam course ~id add teacher [email="[email protected]"][email protected][/email]

 

gam print courses status ACTIVE | gam csv - gam course ~id add teacher [email="[email protected]"][email protected][/email]

 

Think you'll get an error if you try and add a teacher to an archived class (you certainly do for students)

  • Thanks 2
Posted

Thanks so much guys!

 

Command works but it looks like I hit 1000 teacher limit...

 

Would adding the account as the owner to the classrooms via GAM work?

Posted
Wasn't aware there was a limit but I guess that makes sense. I think 1000 classes is a lot for one user. I've noticed when salamander creates our classes for us it creates an admin user per year group. It might be worth trying something similar. So you have multiple a different owner per class year group. I suspect trying to work with 1000 classes in a browser or mobile device will be very difficult.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...