Ejemplo n.º 1
0
def pinboard_get_teacher_sub_classes(var=None):
    """
    Returns list of classes available for subbing
    """
    from openstudio.os_teacher import Teacher

    if auth.user.id and auth.user.teacher:
        teachers_id = auth.user.id
        cache_clear_classschedule()
    else:
        return ''

    teacher = Teacher(auth.user.id)

    return teacher.get_subrequests_formatted()
Ejemplo n.º 2
0
def ep_index_teacher_sub_classes():
    """
        @return: List classes that need to get subbed
    """
    from openstudio.os_teacher import Teacher

    if auth.user.id and auth.user.teacher:
        teachers_id = auth.user.id
        cache_clear_classschedule()
    else:
        return ''

    session.ep_available_for_sub_back = 'ep_index'

    teacher = Teacher(auth.user.id)

    return teacher.get_subrequests_formatted()