Change behavior of existing v0.5 mobile api /api/mobile/v0.5/users/{username}/course_enrollments/ to exclude expired courses due to audit duration limits from the result set.
Add v1 version of mobile api /api/mobile/v1/users/{username}/course_enrollments/ that returns all enrollments and includes a field audiit_access_expires that contains expiration date (or null).
REV-495
11 lines
222 B
Python
11 lines
222 B
Python
"""
|
|
Common utility methods for Mobile APIs.
|
|
"""
|
|
API_V05 = 'v0.5'
|
|
API_V1 = 'v1'
|
|
|
|
|
|
def parsed_version(version):
|
|
""" Converts string X.X.X.Y to int tuple (X, X, X) """
|
|
return tuple(map(int, (version.split(".")[:3])))
|