From 296202ca73753ea900ff79f7d738772cafddf007 Mon Sep 17 00:00:00 2001 From: Matthieu Falce Date: Fri, 14 Oct 2016 16:13:21 +0200 Subject: [PATCH] Default course enrollments to honor to keep certificate working. The default course mode for dogwood is audit, but it doesn't provide free attestations for the course, so it's not what we want to do at FUN. Maybe some docs will be incohrent with the enrollment => the default mode is HONOR. Closes #3249 --- common/djangoapps/course_modes/models.py | 5 +++-- common/djangoapps/student/models.py | 2 ++ common/djangoapps/student/views.py | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/common/djangoapps/course_modes/models.py b/common/djangoapps/course_modes/models.py index 066173bf8c25..b67ae5b91aca 100644 --- a/common/djangoapps/course_modes/models.py +++ b/common/djangoapps/course_modes/models.py @@ -100,8 +100,9 @@ class CourseMode(models.Model): NO_ID_PROFESSIONAL_MODE = "no-id-professional" CREDIT_MODE = "credit" - DEFAULT_MODE = Mode(AUDIT, _('Audit'), 0, '', 'usd', None, None, None) - DEFAULT_MODE_SLUG = AUDIT + ### FUN: default enrollment mode to honor + DEFAULT_MODE = Mode(HONOR, _('Honor Code Certificate'), 0, '', 'usd', None, None, None) + DEFAULT_MODE_SLUG = HONOR # Modes that allow a student to pursue a verified certificate VERIFIED_MODES = [VERIFIED, PROFESSIONAL] diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index d3976288a4b7..be67c398fa8f 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -1103,6 +1103,7 @@ def enroll(cls, user, course_key, mode=None, check_access=False): `course_key` is our usual course_id string (e.g. "edX/Test101/2013_Fall) + ### FUN: default enrollment mode to honor `mode` is a string specifying what kind of enrollment this is. The default is the default course mode, 'audit'. Other options include 'professional', 'verified', 'honor', @@ -1183,6 +1184,7 @@ def enroll_by_email(cls, email, course_id, mode=None, ignore_errors=True): `course_id` is our usual course_id string (e.g. "edX/Test101/2013_Fall) + ### FUN: default enrollment mode to honor `mode` is a string specifying what kind of enrollment this is. The default is the default course mode, 'audit'. Other options include 'professional', 'verified', 'honor', diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 48961b90ff91..18f6b09f1fb8 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -1007,6 +1007,8 @@ def change_enrollment(request, check_access=True): # Check that auto enrollment is allowed for this course # (= the course is NOT behind a paywall) if CourseMode.can_auto_enroll(course_id): + ### FUN: default enrollment mode to honor + # Enroll the user using the default mode (audit) # We're assuming that users of the course enrollment table # will NOT try to look up the course enrollment model