def in_show_grades_period(term, request): """ return true if it is within the grades display window - before the 1st day of next quarter """ comparison_date = get_comparison_date(request) next_term = get_term_after(term) return comparison_date < next_term.first_day_quarter
def get_reg_data(now, request): """ now is the second after mid-night """ term_reg_data = { "after_start": False, "after_summer1_start": False, "after_summerA_start": False, } next_term = get_next_quarter(request) get_term_reg_data(now, next_term, term_reg_data) # We need to show this term's registration stuff, because # the period 2 stretches past the grade submission deadline current_term = get_current_quarter(request) get_term_reg_data(now, current_term, term_reg_data) # We also need to be able to show the term after next, in spring quarter term_after_next = get_term_after(next_term) get_term_reg_data(now, term_after_next, term_reg_data) return term_reg_data
def get_reg_data(now, request): """ now is the second after mid-night """ term_reg_data = { "after_start": False, "after_summer1_start": False, "after_summerA_start": False, "myplan_peak_load": False } next_term = get_next_quarter(request) get_term_reg_data(now, next_term, term_reg_data) # We need to show this term's registration stuff, because # the period 2 stretches past the grade submission deadline current_term = get_current_quarter(request) get_term_reg_data(now, current_term, term_reg_data) # We also need to be able to show the term after next, in spring quarter term_after_next = get_term_after(next_term) get_term_reg_data(now, term_after_next, term_reg_data) return term_reg_data