## mako
<%page args="active_page=None" />

<%
if active_page == None and active_page_context is not UNDEFINED:
  # If active_page is not passed in as an argument, it may be in the context as active_page_context
  active_page = active_page_context

def url_class(is_active):
  if is_active:
    return "active"
  return ""
%>
<%! from courseware.tabs import get_course_tabs %>

<nav class="${active_page} course-material">
  <div class="inner-wrapper">
    <ol class="course-tabs">
      % for tab in get_course_tabs(user, course, active_page):
          <li>
             <a href="${tab.link | h}" class="${url_class(tab.is_active)}">${tab.name | h}</a>
          </li>
      % endfor
    <%block name="extratabs" />
    </ol>
  </div>
</nav>
