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
4aab04e4
Commit
4aab04e4
authored
Jul 24, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #290 from MITx/feature/cpennington/disable-start-date-flag
Add feature flag for disabling course start dates
parents
d8f8d8c6
98910a2d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
2 deletions
+9
-2
lms/djangoapps/courseware/courses.py
+2
-1
lms/envs/common.py
+4
-0
lms/envs/dev.py
+2
-0
lms/templates/dashboard.html
+1
-1
No files found.
lms/djangoapps/courseware/courses.py
View file @
4aab04e4
...
@@ -36,7 +36,8 @@ def check_course(course_id, course_must_be_open=True, course_required=True):
...
@@ -36,7 +36,8 @@ def check_course(course_id, course_must_be_open=True, course_required=True):
except
(
KeyError
,
ItemNotFoundError
):
except
(
KeyError
,
ItemNotFoundError
):
raise
Http404
(
"Course not found."
)
raise
Http404
(
"Course not found."
)
if
course_must_be_open
and
not
course
.
has_started
():
started
=
course
.
has_started
()
or
settings
.
MITX_FEATURES
[
'DISABLE_START_DATES'
]
if
course_must_be_open
and
not
started
:
raise
Http404
(
"This course has not yet started."
)
raise
Http404
(
"This course has not yet started."
)
return
course
return
course
...
...
lms/envs/common.py
View file @
4aab04e4
...
@@ -41,6 +41,10 @@ MITX_FEATURES = {
...
@@ -41,6 +41,10 @@ MITX_FEATURES = {
'DISPLAY_HISTOGRAMS_TO_STAFF'
:
True
,
'DISPLAY_HISTOGRAMS_TO_STAFF'
:
True
,
'REROUTE_ACTIVATION_EMAIL'
:
False
,
# nonempty string = address for all activation emails
'REROUTE_ACTIVATION_EMAIL'
:
False
,
# nonempty string = address for all activation emails
'DEBUG_LEVEL'
:
0
,
# 0 = lowest level, least verbose, 255 = max level, most verbose
'DEBUG_LEVEL'
:
0
,
# 0 = lowest level, least verbose, 255 = max level, most verbose
## DO NOT SET TO True IN THIS FILE
## 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
}
}
# Used for A/B testing
# Used for A/B testing
...
...
lms/envs/dev.py
View file @
4aab04e4
...
@@ -13,6 +13,8 @@ from .logsettings import get_logger_config
...
@@ -13,6 +13,8 @@ from .logsettings import get_logger_config
DEBUG
=
True
DEBUG
=
True
TEMPLATE_DEBUG
=
True
TEMPLATE_DEBUG
=
True
MITX_FEATURES
[
'DISABLE_START_DATES'
]
=
True
WIKI_ENABLED
=
True
WIKI_ENABLED
=
True
LOGGING
=
get_logger_config
(
ENV_ROOT
/
"log"
,
LOGGING
=
get_logger_config
(
ENV_ROOT
/
"log"
,
...
...
lms/templates/dashboard.html
View file @
4aab04e4
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<article
class=
"my-course"
>
<article
class=
"my-course"
>
<
%
<
%
if
course
.
has_started
()
:
if
course
.
has_started
()
or
settings
.
MITX_FEATURES
['
DISABLE_START_DATES
']
:
course_target =
reverse('info',
args=
[course.id])
course_target =
reverse('info',
args=
[course.id])
else:
else:
course_target =
reverse('about_course',
args=
[course.id])
course_target =
reverse('about_course',
args=
[course.id])
...
...
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