Files
edx-platform/lms/djangoapps/program_enrollments/rest_api/v1/constants.py
2021-02-22 12:58:16 +05:00

33 lines
852 B
Python

"""
Constants used throughout the program_enrollments V1 API.
"""
# Captures strings composed of alphanumeric characters a-f and dashes.
PROGRAM_UUID_PATTERN = r'(?P<program_uuid>[A-Fa-f0-9-]+)'
# Maximum number of students that may be enrolled at once.
MAX_ENROLLMENT_RECORDS = 25
# The name of the key that identifies students for POST/PATCH requests
REQUEST_STUDENT_KEY = 'student_key'
# This flag should only be enabled on sandboxes.
# It enables the endpoint that wipes all program enrollments.
ENABLE_ENROLLMENT_RESET_FLAG = 'ENABLE_ENROLLMENT_RESET'
class CourseRunProgressStatuses:
"""
Statuses that a course run can be in with respect to user progress.
"""
IN_PROGRESS = 'in_progress'
UPCOMING = 'upcoming'
COMPLETED = 'completed'
__ALL__ = (
IN_PROGRESS,
UPCOMING,
COMPLETED,
)