diff --git a/cms/djangoapps/contentstore/views/tests/test_tabs.py b/cms/djangoapps/contentstore/views/tests/test_tabs.py index 5966895d2f49..3f0a6f02f1b4 100644 --- a/cms/djangoapps/contentstore/views/tests/test_tabs.py +++ b/cms/djangoapps/contentstore/views/tests/test_tabs.py @@ -191,10 +191,10 @@ def test_delete(self): tabs.primitive_delete(course, 6) assert course.tabs[1] != {'type': 'dates', 'name': 'Dates'} - tabs.primitive_delete(course, 1) + tabs.primitive_delete(course, len(course.tabs) - 2) assert {'type': 'progress'} not in course.tabs # Check that dates has shifted up - assert course.tabs[1] == {'type': 'dates', 'name': 'Dates'} + assert course.tabs[-1] == {'type': 'dates', 'name': 'Dates'} def test_insert(self): """Test primitive tab insertion.""" diff --git a/lms/djangoapps/courseware/tabs.py b/lms/djangoapps/courseware/tabs.py index 94caf0a4fb94..1949cd268864 100644 --- a/lms/djangoapps/courseware/tabs.py +++ b/lms/djangoapps/courseware/tabs.py @@ -61,6 +61,7 @@ class SyllabusTab(EnrolledTab): """ type = 'syllabus' title = gettext_noop('Syllabus') + priority = 980 view_name = 'syllabus' allow_multiple = True is_default = False @@ -78,6 +79,7 @@ class ProgressTab(EnrolledTab): """ type = 'progress' title = gettext_noop('Progress') + priority = 990 view_name = 'progress' is_hideable = True is_default = False @@ -303,6 +305,7 @@ class DatesTab(EnrolledTab): type = "dates" # We don't have the user in this context, so we don't want to translate it at this level. title = gettext_noop("Dates") + priority = 1000 view_name = "dates" def __init__(self, tab_dict):