The get_course_members API returns a dict of users associated with a course. This is a potentially expensive operation on a large course, so there is a control in place to limit its cost. If a course has more than settings.COURSE_MEMBER_API_ENROLLMENT_LIMIT enrollments, then the function raises an OverEnrollmentLimitException. This API was added to help implement the LTI 1.3 Names and Roles Provisioning service. Jira references: [BD-24] [BB-2726] [TNL-7330] Pull request: #25843 Co-authored-by: Giovanni Cimolin da Silva <giovannicimolin@gmail.com>
12 lines
273 B
Python
12 lines
273 B
Python
"""
|
|
Course API custom exceptions
|
|
"""
|
|
|
|
|
|
class OverEnrollmentLimitException(Exception):
|
|
"""
|
|
Exception used by `get_course_members` to signal when a
|
|
course has more enrollments than the limit specified on
|
|
`settings.COURSE_MEMBER_API_ENROLLMENT_LIMIT`.
|
|
"""
|