MICROBA-1055 Require a valid enrollment mode, even on the allowlist (#27012)
This commit is contained in:
@@ -15,3 +15,15 @@ def get_paid_modes_for_course(course_run_id):
|
||||
A list of paid modes (strings) that the course has attached to it.
|
||||
"""
|
||||
return _CourseMode.paid_modes_for_course(course_run_id)
|
||||
|
||||
|
||||
def is_eligible_for_certificate(mode_slug, status=None):
|
||||
"""
|
||||
Returns whether or not the given mode_slug is eligible for a
|
||||
certificate. Currently all modes other than 'audit' grant a
|
||||
certificate. Note that audit enrollments which existed prior
|
||||
to December 2015 *were* given certificates, so there will be
|
||||
GeneratedCertificate records with mode='audit' which are
|
||||
eligible.
|
||||
"""
|
||||
return _CourseMode.is_eligible_for_certificate(mode_slug, status)
|
||||
|
||||
Reference in New Issue
Block a user