Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
da16b3da
Commit
da16b3da
authored
Dec 11, 2015
by
Renzo Lucioni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dead code
Deletes unused code from an old implementation of microsites.
parent
bdea61c8
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
30 deletions
+4
-30
common/djangoapps/student/views.py
+2
-6
lms/djangoapps/courseware/courses.py
+1
-1
lms/djangoapps/courseware/views.py
+1
-1
lms/envs/common.py
+0
-20
lms/envs/dev.py
+0
-2
No files found.
common/djangoapps/student/views.py
View file @
da16b3da
...
...
@@ -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
)
...
...
lms/djangoapps/courseware/courses.py
View file @
da16b3da
...
...
@@ -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).
...
...
lms/djangoapps/courseware/views.py
View file @
da16b3da
...
...
@@ -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"
]):
...
...
lms/envs/common.py
View file @
da16b3da
...
...
@@ -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
,
...
...
lms/envs/dev.py
View file @
da16b3da
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment