feat!: Change the way tabs are ordered [BD-38] [TNL-9174] [BB-5076] (#29262)

* feat!: Change the way tabs are ordered
The change imposes a new ordering for tabs based on their new priority. When reordering tabs, this ordering will be maintained.

* fix: Apply suggestions from code review

Co-authored-by: Farhaan Bukhsh <farhaan@opencraft.com>

* fix: review feedback

Co-authored-by: Farhaan Bukhsh <farhaan@opencraft.com>
This commit is contained in:
Kshitij Sobti
2021-11-22 06:17:30 +00:00
committed by GitHub
parent 2e2701d82a
commit e8e8f4acbe
16 changed files with 115 additions and 140 deletions

View File

@@ -195,6 +195,7 @@ class LtiCourseTab(LtiCourseLaunchMixin, EnrolledTab):
A tab to add custom LTI components to a course in a tab.
"""
type = 'lti_tab'
priority = 120
is_default = False
allow_multiple = True
@@ -266,6 +267,7 @@ class DiscussionLtiCourseTab(LtiCourseLaunchMixin, TabFragmentViewMixin, Enrolle
Course tab that loads the associated LTI-based discussion provider in a tab.
"""
type = 'lti_discussion'
priority = 41
allow_multiple = False
is_dynamic = True
title = gettext_lazy("Discussion")