Allow educators to partition masters students as content groups
JIRA:EDUCATOR-4022
This commit is contained in:
@@ -169,11 +169,14 @@ class CourseMode(models.Model):
|
||||
NON_VERIFIED_MODES = [HONOR, AUDIT, NO_ID_PROFESSIONAL_MODE]
|
||||
|
||||
# Modes that allow a student to earn credit with a university partner
|
||||
CREDIT_MODES = [CREDIT_MODE, MASTERS]
|
||||
CREDIT_MODES = [CREDIT_MODE]
|
||||
|
||||
# Modes that are eligible to purchase credit
|
||||
CREDIT_ELIGIBLE_MODES = [VERIFIED, PROFESSIONAL, NO_ID_PROFESSIONAL_MODE]
|
||||
|
||||
# Modes for which certificates/programs may need to be updated
|
||||
CERTIFICATE_RELEVANT_MODES = CREDIT_MODES + CREDIT_ELIGIBLE_MODES + [MASTERS]
|
||||
|
||||
# Modes that are allowed to upsell
|
||||
UPSELL_TO_VERIFIED_MODES = [HONOR, AUDIT]
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ log = getLogger(__name__)
|
||||
|
||||
|
||||
# "interesting" here means "credentials will want to know about it"
|
||||
INTERESTING_MODES = CourseMode.CREDIT_ELIGIBLE_MODES + CourseMode.CREDIT_MODES
|
||||
INTERESTING_MODES = CourseMode.CERTIFICATE_RELEVANT_MODES
|
||||
INTERESTING_STATUSES = [
|
||||
CertificateStatuses.notpassing,
|
||||
CertificateStatuses.downloadable,
|
||||
|
||||
@@ -43,6 +43,8 @@ class TestCredentialsSignalsSendGrade(TestCase):
|
||||
[True, 'no-id-professional', 'downloadable'],
|
||||
[True, 'credit', 'downloadable'],
|
||||
[True, 'verified', 'notpassing'],
|
||||
[True, 'masters', 'downloadable'],
|
||||
[True, 'masters', 'notpassing'],
|
||||
[False, 'audit', 'downloadable'],
|
||||
[False, 'professional', 'generating'],
|
||||
[False, 'no-id-professional', 'generating'],
|
||||
|
||||
@@ -304,7 +304,7 @@ def award_course_certificate(self, username, course_run_key):
|
||||
username
|
||||
)
|
||||
return
|
||||
if certificate.mode in CourseMode.CREDIT_ELIGIBLE_MODES + CourseMode.CREDIT_MODES:
|
||||
if certificate.mode in CourseMode.CERTIFICATE_RELEVANT_MODES:
|
||||
try:
|
||||
course_overview = CourseOverview.get_from_id(course_key)
|
||||
except (CourseOverview.DoesNotExist, IOError):
|
||||
|
||||
Reference in New Issue
Block a user