Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Create a Course by Copying Another Course

213 views
Skip to first unread message

Elsa LAI

unread,
Sep 3, 2022, 11:11:29 AM9/3/22
to GAM for Google Workspace
Hi all,

I would like to use Advanced GAM to create a new course by copying all teaching topics and materials (Classwork) from another course.  My GAM command is like this:

gam create course alias test-copy name "1A MATH" teacher [email] status ACTIVE copyfrom [CourseID] materialstates all markpublishedasdraft true workstates all markpublishedasdraft true removeduedate true copymaterialsfiles true copytopics true

However, the created course is just an empty one.  That means the copy action was unsuccessful.  Is there anything wrong in my command?

After creating the course, GAM's message is like this:

Course: [new CourseID], Copy from Course: [CourseID]
User: [email], Service not applicable/Does not exist


How to solve this problem?

Best wishes,
Elsa



Alex de Vaal

unread,
Feb 20, 2024, 10:24:51 AM2/20/24
to GAM for Google Workspace

My problem is similar, but im also really new to GAM(ADV-XTD3) so maybe i miss something,..?


I've got the same error, but I know the course owner is lost. (User: [ID], Service not applicable/Does not exist)
Is it not possible via GAM to create a new copy of that classroom via cmd to gain a new active one?
Because it's possible to do it manually if you are already in the classroom, I would think of a command like that:

gam create course name "Copy of [oldClassroomName]" copyfrom [id] teacher [new teacher/owner] announcementstates all materialstates all workstates all members all copymaterialsfiles copytopics markdraftaspublished markpublishedasdraft

 
should work fine.
Do you have any ideas for what I could try? (Yes, it is working with an intact classroom.)
Maybe Ross Scroggs

Ross Scroggs

unread,
Feb 20, 2024, 10:33:37 AM2/20/24
to google-ap...@googlegroups.com
If the course owner is lost, the only thing you can do with the Classroom API is to delete the course.

Ross
----
Ross Scroggs



--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/41d219ec-27df-4a41-9a6a-10cd80ac543en%40googlegroups.com.

Alex de Vaal

unread,
Feb 21, 2024, 3:50:06 PM2/21/24
to GAM for Google Workspace

Thank you very much for your fast reply, Ross.
maybe i found in that case something interesting, what is actually not full understandable for me.

 
I just checked some classrooms where the owner is lost ("ownerEmail: User Unknown"; "Owner ID:xxx; Does not Exist").
 
I found different types of "lost."  Some classes are still able to copy due to the "loststate, but some are not available on the classroom website.
GAM (ADV) handles both types identically, "Service not applicable/Does not exist,"  but if I can copy them in the manual, GAM should be able to do that too, i think (except if it does not check if the information is truly unreadable, but does an "easyer" check, like if there is an existing user).
 
I noticed that you are really active in the topics here, so maybe you already know why GAM does not differentiate between these cases?

Alex

Ross Scroggs

unread,
Feb 21, 2024, 3:54:06 PM2/21/24
to google-ap...@googlegroups.com
What you can do in the console and what the API lets GAM do are not the same.

Send me a Meet/Zoom invitatiojn and we can discuss the issue.

Ross
----
Ross Scroggs


Ross Scroggs

unread,
Feb 21, 2024, 5:37:39 PM2/21/24
to google-ap...@googlegroups.com
Get 6.70.02. Try to copy the lost courses with GAM

Ross
----
Ross Scroggs


Alex de Vaal

unread,
Feb 23, 2024, 7:21:57 AM2/23/24
to GAM for Google Workspace

Hey Ross, 
I'm really sorry about the late reply.

I just tried yesterday to get the pyinstaller running, but I ran into some restrictions from my company for devices. I tried to make a workaround, but it was not really successful.
I'm on vacation tomorrow, but I want to let you know that I didn't forget about your post here, but that I was not able to test it right now.
I start another try after I'm back at the company.
So, thank you for your time till now, and hopefully we will write in a few weeks again! :)

Robert

unread,
Aug 12, 2024, 12:38:41 PM8/12/24
to GAM for Google Workspace
Did you ever find a solution to this? I'm having the same issue, and the course owner is not lost.

Ross Scroggs

unread,
Aug 12, 2024, 1:21:17 PM8/12/24
to google-ap...@googlegroups.com
Robert,

Send me a Meet/Zoom invitation and I'll help.

Ross
----
Ross Scroggs


--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

Robert

unread,
Aug 12, 2024, 6:00:45 PM8/12/24
to GAM for Google Workspace
Hi Ross,

I tried this again and it's working, however, most of the materials and assignments aren't copying. Below is the command I'm running

gam create course alias NEW name "NEWTEST" teacher [tea...@email.com] status ACTIVE copyfrom 618617423311 copytopics true materialstates all markpublishedasdraft true workstates all individualstudentassignments maptoall markpublishedasdraft true removeduedate true copymaterialsfiles true announcementstates all members all

Below is the output I receive

Getting all Course Announcement IDs that match query (Course Announcement States: DRAFT,PUBLISHED,DELETED) for Course: 618617423311
Got 1 Course Announcement ID that matched query (Course Announcement States: DRAFT,PUBLISHED,DELETED) for Course: 618617423311...
Getting all Course Material IDs that match query (Course Material States: DRAFT,PUBLISHED,DELETED) for Course: 618617423311
Got 94 Course Material IDs that matched query (Course Material States: DRAFT,PUBLISHED,DELETED) for Course: 618617423311...
Course: 618617423311, Course Material ID: 683783137659, Course Material Form: Kickball Ability, Not Copied: Not Copyable
Getting all Course Work IDs that match query (Course Work States: DRAFT,PUBLISHED,DELETED) for Course: 618617423311
Got 390 Course Work IDs that matched query (Course Work States: DRAFT,PUBLISHED,DELETED) for Course: 618617423311...
Course: 618617423311, Course Work ID: 618625918687, Course Material Form: 13 Colonies Test, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 618625918739, Course Material Form: Biology: Multicellular Organisms/Living Systems, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 618625918624, Course Material Form: First Colonies Test, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 618625918660, Course Material Form: Mixtures and Solutions Test, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 628877073165, Course Material Form: European Explorers Test, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 657219728896, Course Material Form: Water and Weather Test, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 656957341529, Course Material Form: Principal's Challenge, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 650865504841, Course Material Form: Class Job Application, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 618625918527, Course Material Form: Chapter 2 Test, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 645263004577, Course Material Form: Figurative Language Test, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 618625918486, Course Material Form: Chapter 1 Test:, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 637439294758, Course Material Form: THEME Quiz, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 634772716193, Course Material Form: Science Test: Solar System, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 618625918437, Course Material Form: Where the Wild Things Are Quiz, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 618625918498, Course Material Form: Mystery Picture Multiplication Facts, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 619565640605, Course Material Form: Class Job Application, Not Copied: Not Copyable
Course: 618617423311, Course Work ID: 618625918309, Course Material Form: Student Interest Form, Not Copied: Not Copyable
Getting all Course Topics for Course: 618617423311
Got 19 Course Topics for Course: 618617423311...
Course Name: NEWTEST, Course: 703818600464, Created
Course: 703818600464, Copy from Course: 618617423311
  Course: 703818600464, Add 0 Students
  Course: 703818600464, Add 5 Teachers
REDACTED
  Course: 703818600464, Course Topic: Music, Added from Course: 618617423311 (1/19)
  Course: 703818600464, Course Topic: Science, Added from Course: 618617423311 (2/19)
  Course: 703818600464, Course Topic: Community Topics, Added from Course: 618617423311 (3/19)
  Course: 703818600464, Course Topic: PE, Added from Course: 618617423311 (4/19)
  Course: 703818600464, Course Topic: Digital Citizenship, Added from Course: 618617423311 (5/19)
  Course: 703818600464, Course Topic: Computer Science: Coding/Programming, Added from Course: 618617423311 (6/19)
  Course: 703818600464, Course Topic: Art, Added from Course: 618617423311 (7/19)
  Course: 703818600464, Course Topic: Science, Added from Course: 618617423311 (8/19)
  Course: 703818600464, Course Topic: Social Studies, Added from Course: 618617423311 (9/19)
  Course: 703818600464, Course Topic: ELA Writing, Added from Course: 618617423311 (10/19)
  Course: 703818600464, Course Topic: ELA Newsela/ReadWorks, Added from Course: 618617423311 (11/19)
  Course: 703818600464, Course Topic: ELA Guided Reading, Added from Course: 618617423311 (12/19)
  Course: 703818600464, Course Topic: ELA Independent Reading, Added from Course: 618617423311 (13/19)
  Course: 703818600464, Course Topic: ELA Read Aloud, Added from Course: 618617423311 (14/19)
  Course: 703818600464, Course Topic: ELA Digital ELA Journal, Added from Course: 618617423311 (15/19)
  Course: 703818600464, Course Topic: Math, Added from Course: 618617423311 (16/19)
  Course: 703818600464, Course Topic: Biz Town, Added from Course: 618617423311 (17/19)
  Course: 703818600464, Course Topic: Zoom Login, Added from Course: 618617423311 (18/19)
  Course: 703818600464, Course Topic: Classwork/Homework, Added from Course: 618617423311 (19/19)
  Course: 703818600464, Course Announcement ID: 676399198237, Course Material Drive File: 1QekuQdLhpiNMLqSXxnJUfdoTb4K8g_8k9wb7_R85Ncc, Copied from Course: 618617423311, Course Material Drive File: 1-_GsImKXz6GwgcC_8UHHSfUJu4nRbX_SQ-zaQjk1Vwg

ERROR: 400: invalidArgument - individual_students_options.student_ids: Student ids must be specified if the assignee mode is "INDIVIDUAL_STUDENTS".



It copies about 8 of the materials and none of the assignments. It also doesn't copy the announcements, but that's not really important. I should also mention, the reason I'm trying to use GAM is because the teacher receives a generic error message when trying to copy the class in Google Classroom, so there may be an issue outside of GAM. 

Ross Scroggs

unread,
Aug 13, 2024, 3:34:34 PM8/13/24
to google-ap...@googlegroups.com
Robert,

Send me a Meet/Zoom ibvitation and we'll investigate.

Ross
----
Ross Scroggs



Robert

unread,
Aug 13, 2024, 3:50:18 PM8/13/24
to google-ap...@googlegroups.com
Thanks, Ross. I'll send you a Teams invite around 2pm, if you're available.

You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/hbCTGC5bElw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/50496D5E-0FD0-45A6-89E6-AF1154FAE044%40gmail.com.

Ross Scroggs

unread,
Aug 13, 2024, 4:06:14 PM8/13/24
to google-ap...@googlegroups.com
That's 2pm California time, correct?

Ross
----
Ross Scroggs


Robert

unread,
Aug 13, 2024, 4:16:51 PM8/13/24
to google-ap...@googlegroups.com
Correct. It may be more like 2:15pm.

Ross Scroggs

unread,
Aug 13, 2024, 4:20:25 PM8/13/24
to google-ap...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages