Ejemplo n.º 1
0
def get_current_quarter_course_campuses(request):
    """
    Returns a dictionary indicating the campuses that the student
    has enrolled in the current quarter.
    """
    try:
        current_quarter_sche = get_current_quarter_schedule(request)
    except Exception as ex:
        log_exception(logger, 'get_current_quarter_course_campuses',
                      traceback.format_exc())
        current_quarter_sche = None
    return _get_campuses_by_schedule(current_quarter_sche)
Ejemplo n.º 2
0
def get_current_quarter_course_campuses(request):
    """
    Returns a dictionary indicating the campuses that the student
    has enrolled in the current quarter.
    """
    try:
        current_quarter_sche = get_current_quarter_schedule(request)
    except Exception as ex:
        log_exception(logger,
                      'get_current_quarter_course_campuses',
                      traceback.format_exc())
        current_quarter_sche = None
    return _get_campuses_by_schedule(current_quarter_sche)
Ejemplo n.º 3
0
def get_registered_future_quarters(request):
    """
    Return the list of future quarters that
    has actively enrolled sections
    """
    next_quar_sche = get_next_quarter_schedule(request)
    next_autumn_sche = None
    if next_quar_sche and next_quar_sche.term.is_summer_quarter():
        next_autumn_sche = get_next_autumn_quarter_schedule(request)

    # MUWM-3010
    current = get_current_quarter(request)
    if current.is_summer_quarter():
        summer_term = get_current_summer_term(request)
        if is_a_term(summer_term):
            summer = get_current_quarter_schedule(request)
            next_autumn_sche = next_quar_sche
            next_quar_sche = summer

    return _get_registered_future_quarters(request, next_quar_sche,
                                           next_autumn_sche)
Ejemplo n.º 4
0
def get_registered_future_quarters(request):
    """
    Return the list of future quarters that
    has actively enrolled sections
    """
    next_quar_sche = get_next_quarter_schedule(request)
    next_autumn_sche = None
    if next_quar_sche and next_quar_sche.term.quarter == 'summer':
        next_autumn_sche = get_next_autumn_quarter_schedule(request)

    # MUWM-3010
    current = get_current_quarter(request)
    if current.quarter == "summer":
        summer_term = get_current_summer_term(request)
        if summer_term == "a-term":
            summer = get_current_quarter_schedule(request)
            next_autumn_sche = next_quar_sche
            next_quar_sche = summer

    return _get_registered_future_quarters(request,
                                           next_quar_sche,
                                           next_autumn_sche)
Ejemplo n.º 5
0
def get_current_quarter_course_campuses(request):
    """
    Returns a dictionary indicating the campuses that the student
    has enrolled in the current quarter.
    """
    return _get_campuses_by_schedule(get_current_quarter_schedule(request))