Skip to content

Commit

Permalink
Resolve MUWM-5350
Browse files Browse the repository at this point in the history
  • Loading branch information
fanglinfang committed Jul 21, 2024
1 parent 74fb637 commit f595d15
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
12 changes: 3 additions & 9 deletions myuw/dao/term.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ def get_current_summer_term(request):
"""
if not is_in_summer_quarter(request):
return None
eod_aterm = get_current_quarter(request).get_eod_summer_aterm()
if get_comparison_datetime(request) > eod_aterm:
bterm_first_date = get_current_quarter(request).bterm_first_date
if get_comparison_date(request) >= bterm_first_date:
return "b-term"
else:
return "a-term"
Expand Down Expand Up @@ -526,13 +526,7 @@ def add_term_data_to_context(request, context):
compare <= cur_term.last_final_exam_date):
context['is_finals'] = True

if cur_term.is_summer_quarter():
# MUWM-5350
if compare >= cur_term.bterm_first_date:
context['summer_term'] = "b-term"
else:
context['summer_term'] = "a-term"

context['summer_term'] = get_current_summer_term(request)
context['first_day'] = cur_term.first_day_quarter
context['last_day'] = cur_term.last_day_instruction
context["first_day_quarter"] = cur_term.first_day_quarter
Expand Down
1 change: 1 addition & 0 deletions myuw/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
today: '{{ today|date:"l, F j, Y" }}',
year: '{{ year }}',
quarter: '{{ quarter }}',
summerTerm: '{{ summer_term }}',
breakYear: '{{ break_year }}',
breakQuarter: '{{ break_quarter }}',
isFinals: {{ is_finals|yesno:"true, false"}},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default {
...mapState({
student: (state) => state.user.affiliations.student,
quarter: (state) => state.termData.quarter,
summerTerm: (state) => state.termData.summer_term,
summerTerm: (state) => state.termData.summerTerm,
}),
...mapState('stud_schedule', {
course(state) {
Expand Down

0 comments on commit f595d15

Please sign in to comment.