From 6850c10647890918c58f9eb1fd501cdebf61cf66 Mon Sep 17 00:00:00 2001 From: Dillon Dumesnil Date: Fri, 11 Mar 2022 10:43:53 -0500 Subject: [PATCH] feat: Updates the Dates Tab to be a static tab --- lms/djangoapps/courseware/tabs.py | 5 ----- lms/djangoapps/courseware/tests/test_tabs.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lms/djangoapps/courseware/tabs.py b/lms/djangoapps/courseware/tabs.py index 54190fa833..cb2c349f5f 100644 --- a/lms/djangoapps/courseware/tabs.py +++ b/lms/djangoapps/courseware/tabs.py @@ -330,7 +330,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): @@ -367,10 +366,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 diff --git a/lms/djangoapps/courseware/tests/test_tabs.py b/lms/djangoapps/courseware/tests/test_tabs.py index 82b1c672ba..b159c20b84 100644 --- a/lms/djangoapps/courseware/tests/test_tabs.py +++ b/lms/djangoapps/courseware/tests/test_tabs.py @@ -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'