forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [AXM-33] create enrollments filtering by course completion stat…
…uses (#2532) * feat: [AXM-33] create enrollments filtering by course completion statuses * test: [AXM-33] add tests for filtrations * style: [AXM-33] fix pylint issues
- Loading branch information
1 parent
3868840
commit db7b8ec
Showing
6 changed files
with
325 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
""" | ||
Enums for mobile_api users app. | ||
""" | ||
from enum import Enum | ||
|
||
|
||
class EnrollmentStatuses(Enum): | ||
""" | ||
Enum for enrollment statuses. | ||
""" | ||
|
||
ALL = 'all' | ||
IN_PROGRESS = 'in_progress' | ||
COMPLETED = 'completed' | ||
EXPIRED = 'expired' | ||
|
||
@classmethod | ||
def values(cls): | ||
""" | ||
Returns string representation of all enum values. | ||
""" | ||
return [e.value for e in cls] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.