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
66f79251
Commit
66f79251
authored
Jul 24, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature flag for disabling course start dates
parent
d8f8d8c6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
2 deletions
+5
-2
lms/djangoapps/courseware/courses.py
+1
-1
lms/envs/common.py
+1
-0
lms/envs/dev.py
+2
-0
lms/templates/dashboard.html
+1
-1
No files found.
lms/djangoapps/courseware/courses.py
View file @
66f79251
...
...
@@ -36,7 +36,7 @@ def check_course(course_id, course_must_be_open=True, course_required=True):
except
(
KeyError
,
ItemNotFoundError
):
raise
Http404
(
"Course not found."
)
if
course_must_be_open
and
not
course
.
has_started
(
):
if
course_must_be_open
and
not
(
course
.
has_started
()
or
settings
.
MITX_FEATURES
[
'DISABLE_START_DATES'
]
):
raise
Http404
(
"This course has not yet started."
)
return
course
...
...
lms/envs/common.py
View file @
66f79251
...
...
@@ -41,6 +41,7 @@ MITX_FEATURES = {
'DISPLAY_HISTOGRAMS_TO_STAFF'
:
True
,
'REROUTE_ACTIVATION_EMAIL'
:
False
,
# nonempty string = address for all activation emails
'DEBUG_LEVEL'
:
0
,
# 0 = lowest level, least verbose, 255 = max level, most verbose
'DISABLE_START_DATES'
:
False
,
# When True, all courses will be active, regardless of start date
}
# Used for A/B testing
...
...
lms/envs/dev.py
View file @
66f79251
...
...
@@ -13,6 +13,8 @@ from .logsettings import get_logger_config
DEBUG
=
True
TEMPLATE_DEBUG
=
True
MITX_FEATURES
[
'DISABLE_START_DATES'
]
=
True
WIKI_ENABLED
=
True
LOGGING
=
get_logger_config
(
ENV_ROOT
/
"log"
,
...
...
lms/templates/dashboard.html
View file @
66f79251
...
...
@@ -65,7 +65,7 @@
<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])
else:
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