Description Usage Arguments Value Examples
View source: R/simple_functions.R
This function is used to enroll a user in a specific course. Enrollment-settings can be altered, such as silent or invited enrollment and teacher or student enrollment.
This function is used to enroll a user in a specific course. Enrollment-settings can be altered, such as silent or invited enrollment and teacher or student enrollment.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | enroll_user_in_course(
course_id,
user_id,
enrollment_type = NULL,
enrollment_state = NULL,
course_section_id = NULL,
interaction_limit = FALSE
)
enroll_user_in_course(
course_id,
user_id,
enrollment_type = NULL,
enrollment_state = NULL,
course_section_id = NULL,
interaction_limit = FALSE
)
|
course_id |
the course id (integer) |
user_id |
the canvas id of the user (string). Alternatively, the sis_id can be used by setting "sis_login_id:" in front of the sis_id. |
enrollment_type |
the type of the enrollment (string). Allowed values are "StudentEnrolment", "TeacherEnrollment", "TaEnrollment", ObserverEnrollment" and "DesignerEnrollment". |
enrollment_state |
the state of the enrollment (string). Allowed values are "active", "invited" and "inactive". Default is invited. N.B. if this parameter is incorrectly specified, the default is used. |
course_section_id |
the id of the section for the enrollment. Can be located in the URL when visiting the section page in the browser. |
interaction_limit |
limit interaction with users to section only. |
server response. Either 200 status code if everything went correctly or a specific http status warning.
server response. Either 200 status code if everything went correctly or a specific http status warning.
1 2 3 4 | enroll_user_in_course(course_id = 1867, user_id = "sis_login_id:pbosman", enrollment_type = "TeacherEnrollment", enrollment_state = "inactive")
enroll_user_in_course(course_id = 1867, user_id = "sis_login_id:pbosman", enrollment_type = "TeacherEnrollment", enrollment_state = "inactive")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.