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
OpenEdx
edx-platform
Commits
d512e876
Commit
d512e876
authored
Sep 19, 2017
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experimental commit for allowing courses to be visible before start.
parent
18c0a459
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
3 deletions
+1
-3
lms/djangoapps/course_blocks/transformers/start_date.py
+1
-1
lms/djangoapps/courseware/access_utils.py
+0
-2
No files found.
lms/djangoapps/course_blocks/transformers/start_date.py
View file @
d512e876
...
@@ -72,7 +72,7 @@ class StartDateTransformer(FilteringTransformerMixin, BlockStructureTransformer)
...
@@ -72,7 +72,7 @@ class StartDateTransformer(FilteringTransformerMixin, BlockStructureTransformer)
if
usage_info
.
has_staff_access
:
if
usage_info
.
has_staff_access
:
return
[
block_structure
.
create_universal_filter
()]
return
[
block_structure
.
create_universal_filter
()]
removal_condition
=
lambda
block_key
:
not
check_start_date
(
removal_condition
=
lambda
block_key
:
block_key
.
block_type
!=
'course'
and
not
check_start_date
(
usage_info
.
user
,
usage_info
.
user
,
block_structure
.
get_xblock_field
(
block_key
,
'days_early_for_beta'
),
block_structure
.
get_xblock_field
(
block_key
,
'days_early_for_beta'
),
self
.
_get_merged_start_date
(
block_structure
,
block_key
),
self
.
_get_merged_start_date
(
block_structure
,
block_key
),
...
...
lms/djangoapps/courseware/access_utils.py
View file @
d512e876
...
@@ -60,8 +60,6 @@ def check_start_date(user, days_early_for_beta, start, course_key):
...
@@ -60,8 +60,6 @@ def check_start_date(user, days_early_for_beta, start, course_key):
Returns:
Returns:
AccessResponse: Either ACCESS_GRANTED or StartDateError.
AccessResponse: Either ACCESS_GRANTED or StartDateError.
"""
"""
if
COURSE_PRE_START_ACCESS_FLAG
.
is_enabled
(
course_key
):
return
ACCESS_GRANTED
start_dates_disabled
=
settings
.
FEATURES
[
'DISABLE_START_DATES'
]
start_dates_disabled
=
settings
.
FEATURES
[
'DISABLE_START_DATES'
]
if
start_dates_disabled
and
not
is_masquerading_as_student
(
user
,
course_key
):
if
start_dates_disabled
and
not
is_masquerading_as_student
(
user
,
course_key
):
return
ACCESS_GRANTED
return
ACCESS_GRANTED
...
...
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