Allow to override COURSE_ENROLLMENT_MODES in AWS environment
Add more parameters to COURSE_ENROLLMENT_MODES to allow to display friendly mode name and more options Fix python tests of PR #18557 PR #18557: Fix Diff Quality test line too long PR #18557: Fix Diff Quality test unused-variable Use six.iteritems() in COURSE_MODE_SLUG_CHOICES for future Python 3 compatibility
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import six
|
||||
from django import forms
|
||||
from django.conf import settings
|
||||
from django.contrib import admin
|
||||
@@ -23,7 +24,7 @@ from openedx.core.lib.courses import clean_course_id
|
||||
from util.date_utils import get_time_display
|
||||
from xmodule.modulestore.django import modulestore
|
||||
|
||||
COURSE_MODE_SLUG_CHOICES = [(mode_slug, mode_slug) for mode_slug in settings.COURSE_ENROLLMENT_MODES]
|
||||
COURSE_MODE_SLUG_CHOICES = [(key, enrollment_mode['display_name']) for key, enrollment_mode in six.iteritems(settings.COURSE_ENROLLMENT_MODES)]
|
||||
|
||||
|
||||
class CourseModeForm(forms.ModelForm):
|
||||
|
||||
Reference in New Issue
Block a user