Merge pull request #19609 from edx/fix_masquerade_banner

ensure content start date banner only shows for currently open sections
This commit is contained in:
Matthew Piatetsky
2019-01-17 13:12:42 -05:00
committed by GitHub
4 changed files with 42 additions and 16 deletions

View File

@@ -55,7 +55,10 @@ from ..entrance_exams import (
user_can_skip_entrance_exam,
user_has_passed_entrance_exam
)
from ..masquerade import setup_masquerade
from ..masquerade import (
setup_masquerade,
check_content_start_date_for_masquerade_user
)
from ..model_data import FieldDataCache
from ..module_render import get_module_for_descriptor, toc_for_course
@@ -182,6 +185,9 @@ class CoursewareIndex(View):
self._save_positions()
self._prefetch_and_bind_section()
check_content_start_date_for_masquerade_user(self.course_key, self.effective_user, request,
self.course.start, self.chapter.start, self.section.start)
if not request.user.is_authenticated:
qs = urllib.urlencode({
'course_id': self.course_key,