Adds a user as a student of a course.
gc_courses_students_create(Student, courseId, enrollmentCode = NULL)
Student | The gc_student object to pass to this method |
---|---|
courseId | Identifier of the course to create the student in |
enrollmentCode | Enrollment code of the course to create the student in |
This method returns the following error codes:
PERMISSION_DENIED
if the requesting user is not permitted to createstudents in this course or for access errors.
NOT_FOUND
if the requested course ID does not exist.
FAILED_PRECONDITION
if the requested user's account is disabled,for the following request errors:
CourseMemberLimitReached
CourseNotModifiable
UserGroupsMembershipLimitReached
ALREADY_EXISTS
if the user is already a student or teacher in thecourse.
Authentication scopes used by this function are:
https://www.googleapis.com/auth/classroom.profile.emails
https://www.googleapis.com/auth/classroom.profile.photos
https://www.googleapis.com/auth/classroom.rosters
Set options(googleAuthR.scopes.selected = c("https://www.googleapis.com/auth/classroom.profile.emails", "https://www.googleapis.com/auth/classroom.profile.photos", "https://www.googleapis.com/auth/classroom.rosters")
Then run googleAuthR::gar_auth()
to authenticate.
See gar_auth
for details.
Other Student functions:
gc_student()