Merge pull request #30047 from openedx/ddumesnil/dates-tab-static

feat: Updates the Dates Tab to be a static tab
This commit is contained in:
Michael Terry
2022-03-24 09:53:25 -04:00
committed by GitHub
2 changed files with 1 additions and 6 deletions

View File

@@ -332,7 +332,6 @@ class DatesTab(EnrolledTab):
title = gettext_noop("Dates")
priority = 30
view_name = "dates"
is_dynamic = True
def __init__(self, tab_dict):
def link_func(course, reverse_func):
@@ -370,10 +369,6 @@ def get_course_tab_list(user, course):
if tab.type == 'static_tab' and tab.course_staff_only and \
not bool(user and has_access(user, 'staff', course, course.id)):
continue
# We are phasing this out in https://github.com/openedx/edx-platform/pull/30045/, but need this
# until the backfill course tabs command is completed
if tab.type == 'dates':
continue
course_tab_list.append(tab)
# Add in any dynamic tabs, i.e. those that are not persisted

View File

@@ -390,7 +390,7 @@ class EntranceExamsTabsTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase, Mi
milestone
)
course_tab_list = get_course_tab_list(self.user, self.course)
assert len(course_tab_list) == 2
assert len(course_tab_list) == 1
assert course_tab_list[0]['tab_id'] == 'courseware'
assert course_tab_list[0]['name'] == 'Entrance Exam'