def _get_dynamic_tabs(course, user):
 dynamic_tabs = list()
 for tab_type in CourseTabPluginManager.get_tab_types():
  if getattr(tab_type, 'is_dynamic', False):
   tab = tab_type(dict())
   if tab.is_enabled(course, user=user):
    dynamic_tabs.append(tab)
 dynamic_tabs.sort(key=(lambda dynamic_tab: dynamic_tab.name))
 return dynamic_tabs

def _get_dynamic_tabs ( course , user ) : dynamic_tabs = list ( ) for tab_type in CourseTabPluginManager . get_tab_types ( ) : if getattr ( tab_type , 'is_dynamic' , False ) : tab = tab_type ( dict ( ) ) if tab . is_enabled ( course , user = user ) : dynamic_tabs . append ( tab ) dynamic_tabs . sort ( key = ( lambda dynamic_tab : dynamic_tab . name ) ) return dynamic_tabs
returns the dynamic tab types for the current user .