Commit 0107525d by Peter Fogg

Enable self-paced courses behind a feature flag.

parent 9d88bef1
......@@ -54,7 +54,8 @@ class CourseDetails(object):
'50'
) # minimum passing score for entrance exam content module/tree,
self.has_cert_config = None # course has active certificate configuration
self.self_paced = None
if settings.FEATURES.get('ENABLE_SELF_PACED_COURSES'):
self.self_paced = None
@classmethod
def _fetch_about_attribute(cls, course_key, attribute):
......@@ -87,7 +88,8 @@ class CourseDetails(object):
# Default course license is "All Rights Reserved"
course_details.license = getattr(descriptor, "license", "all-rights-reserved")
course_details.has_cert_config = has_active_web_certificate(descriptor)
course_details.self_paced = descriptor.self_paced
if settings.FEATURES.get('ENABLE_SELF_PACED_COURSES'):
course_details.self_paced = descriptor.self_paced
for attribute in ABOUT_ATTRIBUTES:
value = cls._fetch_about_attribute(course_key, attribute)
......@@ -190,7 +192,9 @@ class CourseDetails(object):
descriptor.language = jsondict['language']
dirty = True
if 'self_paced' in jsondict and jsondict['self_paced'] != descriptor.self_paced:
if (settings.FEATURES.get('ENABLE_SELF_PACED_COURSES')
and 'self_paced' in jsondict
and jsondict['self_paced'] != descriptor.self_paced):
descriptor.self_paced = jsondict['self_paced']
dirty = True
......
......@@ -106,6 +106,9 @@ FEATURES['ENTRANCE_EXAMS'] = True
FEATURES['ENABLE_PROCTORED_EXAMS'] = True
# Enable self-paced courses
FEATURES['ENABLE_SELF_PACED_COURSES'] = True
# Point the URL used to test YouTube availability to our stub YouTube server
YOUTUBE_PORT = 9080
YOUTUBE['API'] = "http://127.0.0.1:{0}/get_youtube_api/".format(YOUTUBE_PORT)
......
......@@ -182,6 +182,9 @@ FEATURES = {
# Timed or Proctored Exams
'ENABLE_PROCTORED_EXAMS': False,
# Enable self-paced courses.
'ENABLE_SELF_PACED_COURSES': False,
}
ENABLE_JASMINE = False
......
......@@ -279,3 +279,6 @@ FEATURES['ENABLE_TEAMS'] = True
# Dummy secret key for dev/test
SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd'
# Enable self-paced courses
FEATURES['ENABLE_SELF_PACED_COURSES'] = True
......@@ -131,6 +131,9 @@ FEATURES['LICENSING'] = True
# Use the auto_auth workflow for creating users and logging them in
FEATURES['AUTOMATIC_AUTH_FOR_TESTING'] = True
# Enable self-paced courses
FEATURES['ENABLE_SELF_PACED_COURSES'] = True
########################### Entrance Exams #################################
FEATURES['MILESTONES_APP'] = True
FEATURES['ENTRANCE_EXAMS'] = True
......
......@@ -408,6 +408,9 @@ FEATURES = {
# Enable LTI Provider feature.
'ENABLE_LTI_PROVIDER': False,
# Enable self-paced courses.
'ENABLE_SELF_PACED_COURSES': False,
}
# Ignore static asset files on import which match this pattern
......
......@@ -532,3 +532,6 @@ AUTHENTICATION_BACKENDS += ('lti_provider.users.LtiBackend',)
# ORGANIZATIONS
FEATURES['ORGANIZATIONS_APP'] = True
# Enable self-paced courses
FEATURES['ENABLE_SELF_PACED_COURSES'] = True
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment