-1

I want to copy a Classroom course with google app script. I can't find the method to do it. I guess it would be something like "Classroom.Course.copy (....)" can this be done? Thanks

1 Answers1

0

You can retrieve a Classroom and then create it with its parameters

Here's my approach:

First add the Advanced Service Classroom V1, then use the following code

function test() {
  var course = Classroom.Courses.get("ID");

  var newClass = {
    name: course.name,
    section: course.section,
    descriptionHeading: course.descriptionHeading,
    description: course.description,
    room: course.room,
    ownerId: course.ownerId,
    courseState: course.courseState
  };

  Classroom.Courses.create(newClass)
}

If you are not sure about the Course ID simply list all your classrooms by using Method: courses.list.

Once you've done this, copy the writable values in order to create the new classroom.

NOTE: most of the courses fields are read-only, that's why there's no explicit method to copy the entire course

References

Jose Vasquez
  • 1,678
  • 1
  • 6
  • 14