## mako <%namespace name='static' file='/static_content.html'/> <%! from django.utils.translation import ugettext as _ from courseware.tabs import get_course_tab_list from django.core.urlresolvers import reverse from django.conf import settings from openedx.core.djangoapps.course_groups.partition_scheme import get_cohorted_user_partition from student.models import CourseEnrollment %> <%page args="active_page=None" /> <% if active_page is 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 selected(is_selected): return "selected" if is_selected else "" show_preview_menu = not disable_preview_menu and staff_access and active_page in ["courseware", "info"] cohorted_user_partition = get_cohorted_user_partition(course) masquerade_user_name = masquerade.user_name if masquerade else None masquerade_group_id = masquerade.group_id if masquerade else None staff_selected = selected(not masquerade or masquerade.role != "student") specific_student_selected = selected(not staff_selected and masquerade.user_name) student_selected = selected(not staff_selected and not specific_student_selected and not masquerade_group_id) include_special_exams = settings.FEATURES.get('ENABLE_SPECIAL_EXAMS', False) and (course.enable_proctored_exams or course.enable_timed_exams) %> % if include_special_exams: <%static:js group='proctoring'/> % for template_name in ["proctored-exam-status"]: % endfor
% endif % if show_preview_menu: % endif % if disable_tabs is UNDEFINED or not disable_tabs: %endif % if show_preview_menu: % endif