Commit d512e876 by Diana Huang

Experimental commit for allowing courses to be visible before start.

parent 18c0a459
...@@ -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),
......
...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment