Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
4aab04e4
Commit
4aab04e4
authored
12 years ago
by
Calen Pennington
Browse files
Options
Downloads
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
Loading
Loading
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
lms/djangoapps/courseware/courses.py
+2
-1
2 additions, 1 deletion
lms/djangoapps/courseware/courses.py
lms/envs/common.py
+4
-0
4 additions, 0 deletions
lms/envs/common.py
lms/envs/dev.py
+2
-0
2 additions, 0 deletions
lms/envs/dev.py
lms/templates/dashboard.html
+1
-1
1 addition, 1 deletion
lms/templates/dashboard.html
with
9 additions
and
2 deletions
lms/djangoapps/courseware/courses.py
+
2
−
1
View file @
4aab04e4
...
...
@@ -36,7 +36,8 @@ 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
():
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.
"
)
return
course
...
...
This diff is collapsed.
Click to expand it.
lms/envs/common.py
+
4
−
0
View file @
4aab04e4
...
...
@@ -41,6 +41,10 @@ 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
## 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
...
...
This diff is collapsed.
Click to expand it.
lms/envs/dev.py
+
2
−
0
View file @
4aab04e4
...
...
@@ -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
"
,
...
...
This diff is collapsed.
Click to expand it.
lms/templates/dashboard.html
+
1
−
1
View file @
4aab04e4
...
...
@@ -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])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment