File tree Expand file tree Collapse file tree
lms/djangoapps/instructor/views Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,6 +76,17 @@ class InstructorDashboardTab(CourseTab):
7676 is_dynamic = True # The "Instructor" tab is instead dynamically added when it is enabled
7777 priority = 300
7878
79+ def __init__ (self , tab_dict ):
80+ # Customize link function to support both legacy dashboard and new MFE tab response based on feature flag
81+ def link_func (course , reverse_func ):
82+ if not legacy_instructor_dashboard ():
83+ return get_instructor_dashboard_url (course .id )
84+ else :
85+ return reverse_func (self .view_name , args = [str (course .id )])
86+
87+ tab_dict ['link_func' ] = link_func
88+ super ().__init__ (tab_dict )
89+
7990 @classmethod
8091 def is_enabled (cls , course , user = None ):
8192 """
@@ -832,4 +843,4 @@ def get_instructor_dashboard_url(course_key: CourseKey) -> str:
832843 Gets instructor microfrontend URL for the current course locator.
833844 """
834845 mfe_base_url = settings .INSTRUCTOR_MICROFRONTEND_URL
835- return f'{ mfe_base_url } /{ course_key } /course_info '
846+ return f'{ mfe_base_url } /{ course_key } '
You can’t perform that action at this time.
0 commit comments