Files
edx-platform/lms/djangoapps/program_enrollments/api/v1/constants.py
2019-05-02 17:42:18 -04:00

31 lines
795 B
Python

"""
Constants and strings for the course-enrollment app
"""
# Captures strings composed of alphanumeric characters a-f and dashes.
PROGRAM_UUID_PATTERN = r'(?P<program_uuid>[A-Fa-f0-9-]+)'
MAX_ENROLLMENT_RECORDS = 25
class CourseEnrollmentResponseStatuses(object):
"""
Class to group response statuses returned by the course enrollment endpoint
"""
ACTIVE = "active"
INACTIVE = "inactive"
DUPLICATED = "duplicated"
INVALID_STATUS = "invalid-status"
CONFLICT = "conflict"
ILLEGAL_OPERATION = "illegal-operation"
NOT_IN_PROGRAM = "not-in-program"
INTERNAL_ERROR = "internal-error"
ERROR_STATUSES = (
DUPLICATED,
INVALID_STATUS,
CONFLICT,
ILLEGAL_OPERATION,
NOT_IN_PROGRAM,
INTERNAL_ERROR,
)