Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions common/djangoapps/course_modes/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 2 additions & 0 deletions common/djangoapps/student/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 2 additions & 0 deletions common/djangoapps/student/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down