'Generator method for iterating through all tabs that can be displayed for the given course and
the given user with the provided access settings.'

@staticmethod
def iterate_displayable(course, user=None, inline_collections=True):

    for tab in course.tabs:
        if (tab.is_enabled(course, user=user) and (not (user and tab.is_hidden))):
            if tab.is_collection:
                if inline_collections:
                    for item in tab.items(course):
                        (yield item)
                elif (len(list(tab.items(course))) > 0):
                    (yield tab)
            else:
                (yield tab)
