Commit da16b3da by Renzo Lucioni

Remove dead code

Deletes unused code from an old implementation of microsites.
parent bdea61c8
......@@ -156,13 +156,9 @@ def index(request, extra_context=None, user=AnonymousUser()):
"""
if extra_context is None:
extra_context = {}
# The course selection work is done in courseware.courses.
domain = settings.FEATURES.get('FORCE_UNIVERSITY_DOMAIN') # normally False
# do explicit check, because domain=None is valid
if domain is False:
domain = request.META.get('HTTP_HOST')
courses = get_courses(user, domain=domain)
courses = get_courses(user)
if microsite.get_value("ENABLE_COURSE_SORTING_BY_START_DATE",
settings.FEATURES["ENABLE_COURSE_SORTING_BY_START_DATE"]):
courses = sort_by_start_date(courses)
......
......@@ -373,7 +373,7 @@ def get_course_syllabus_section(course, section_key):
raise KeyError("Invalid about key " + str(section_key))
def get_courses(user, domain=None, org=None): # pylint: disable=unused-argument
def get_courses(user, org=None):
"""
Returns a list of courses available, sorted by course.number and optionally
filtered by org code (case-insensitive).
......
......@@ -136,7 +136,7 @@ def courses(request):
courses_list = []
course_discovery_meanings = getattr(settings, 'COURSE_DISCOVERY_MEANINGS', {})
if not settings.FEATURES.get('ENABLE_COURSE_DISCOVERY'):
courses_list = get_courses(request.user, request.META.get('HTTP_HOST'))
courses_list = get_courses(request.user)
if microsite.get_value("ENABLE_COURSE_SORTING_BY_START_DATE",
settings.FEATURES["ENABLE_COURSE_SORTING_BY_START_DATE"]):
......
......@@ -73,31 +73,11 @@ FEATURES = {
## Doing so will cause all courses to be released on production
'DISABLE_START_DATES': False, # When True, all courses will be active, regardless of start date
# When True, will only publicly list courses by the subdomain.
'SUBDOMAIN_COURSE_LISTINGS': False,
# Expects you to define COURSE_LISTINGS, a dictionary mapping
# subdomains to lists of course_ids
# COURSE_LISTINGS = {
# 'default': [
# 'BerkeleyX/CS169.1x/2012_Fall',
# 'HarvardX/CS50x/2012',
# 'MITx/3.091x/2012_Fall',
# ],
# 'openedx': [
# 'BerkeleyX/CS169.1x/2012_Fall',
# ],
# }
# To see it in action, add the following to your /etc/hosts file:
# 127.0.0.1 openedx.dev
# When True, will override certain branding with university specific values
# Expects a SUBDOMAIN_BRANDING dictionary that maps the subdomain to the
# university to use for branding purposes
'SUBDOMAIN_BRANDING': False,
'FORCE_UNIVERSITY_DOMAIN': False, # set this to the university domain to use, as an override to HTTP_HOST
# set to None to do no university selection
# for consistency in user-experience, keep the value of the following 3 settings
# in sync with the corresponding ones in cms/envs/common.py
'ENABLE_DISCUSSION_SERVICE': True,
......
......@@ -20,9 +20,7 @@ TEMPLATE_DEBUG = True
HTTPS = 'off'
FEATURES['DISABLE_START_DATES'] = False
FEATURES['ENABLE_SQL_TRACKING_LOGS'] = True
FEATURES['SUBDOMAIN_COURSE_LISTINGS'] = False # Enable to test subdomains--otherwise, want all courses to show up
FEATURES['SUBDOMAIN_BRANDING'] = True
FEATURES['FORCE_UNIVERSITY_DOMAIN'] = None # show all university courses if in dev (ie don't use HTTP_HOST)
FEATURES['ENABLE_MANUAL_GIT_RELOAD'] = True
FEATURES['ENABLE_SERVICE_STATUS'] = True
FEATURES['ENABLE_INSTRUCTOR_EMAIL'] = True # Enable email for all Studio courses
......
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