Пример #1
0
def navbar_question(question, user):
    sections = []

    if user.has_perm('activities.edit_activity'):
        sections.append(navsection_page_admin(question, user))

    sections.append(navsection_question_common(question, user))

    return navbar(sections)
Пример #2
0
def navbar_classroom(page, user):
    sections = []

    # Admin tasks
    if user.has_perm('classrooms.edit_classroom'):
        sections.append(navsection_page_admin(page, user))

    # Common section
    sections.append(navsection_classroom_common(page, user))
    return navbar(sections)
Пример #3
0
def navbar_list(page, user):
    return navbar(navsection_classroom_common(page, user))
Пример #4
0
def activity_list_navbar(page, user):
    return navbar(admin=True,
                  admin_perms='activities.edit_activity',
                  user=user,
                  page=page)