Skip to content

Commit

Permalink
Merge pull request #3131 from uw-it-aca/qa
Browse files Browse the repository at this point in the history
Qa
  • Loading branch information
fanglinfang committed Jul 23, 2024
2 parents 68b5d99 + a604d5d commit 186d28b
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion myuw/dao/iasystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def summer_term_overlaped(request, given_section):
current summer term in the request
"""
current_summer_term = get_current_summer_term(request)
if given_section is None or current_summer_term is None:
if given_section is None or not current_summer_term:
return True
return (given_section.is_same_summer_term(current_summer_term) or
given_section.is_full_summer_term() and
Expand Down
7 changes: 4 additions & 3 deletions myuw/dao/term.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ def get_current_summer_term(request):
or None if it is not a summer quarter
"""
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:
return "" # MUWM-5350 empty string
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,6 +526,7 @@ def add_term_data_to_context(request, context):
compare <= cur_term.last_final_exam_date):
context['is_finals'] = True

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: 0 additions & 1 deletion myuw/dao/visual_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import logging
from myuw.dao.registration import get_schedule_by_term
from myuw.dao.instructor_schedule import get_instructor_schedule_by_term
from myuw.dao.term import get_current_quarter, get_current_summer_term
from myuw.dao.campus_building import get_building_by_code
from restclients_core.exceptions import DataFailureException
from dateutil.relativedelta import *
Expand Down
3 changes: 2 additions & 1 deletion myuw/data/category_links_import.csv
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ PageAcademics,Grades & Transcripts,all,https://www.washington.edu/uaa/advising/g
PageAcademics,Grades & Transcripts,all,https://sdb.admin.uw.edu/sisStudents/uwnetid/grades.aspx,Grade Report,,,,,,,yes,,,,,,,,,,,,,
PageAcademics,Grades & Transcripts,all,https://apps.registrar.washington.edu/credential_solutions_authentication/public/ce.php,Order Official Transcripts,,,,,,,yes,,,,,,,,,,,,,
PageAcademics,Grades & Transcripts,all,https://sdb.admin.uw.edu/students/uwnetid/unofficial.asp,Unofficial Transcript,,,,,,,yes,,,,,,,,,,,,,
PageAcademics,Graduation,all,,,https://registrar.washington.edu/students/graduation-diplomas/,Application for Graduation,https://www.uwb.edu/registrar/graduation/apply/,Applying for Graduation,https://www.tacoma.uw.edu/uwt/registrar/graduation-procedures,Applying to Graduate,no,,,,,,,,,,,,,
PageAcademics,Graduation,ugrad,,,https://registrar.washington.edu/students/graduation-diplomas/,Application for Graduation (Undergraduate),https://www.uwb.edu/registrar/graduation/apply/,Applying for Graduation (Undergraduate),https://www.tacoma.uw.edu/uwt/registrar/graduation-procedures,Applying to Graduate (Undergraduate),no,,,,,,,,,,,,,
PageAcademics,Graduation,grad,https://grad.uw.edu/current-students/enrollment-through-graduation/graduation-requirements/,Graduation Requirements (Graduate),,,,,,,no,,,,,,,,,,,,,
PageAcademics,Tools & Software,all,,,https://scout.uw.edu/seattle,Scout: Discover the UW,https://scout.uw.edu/bothell,Scout: Discover the UW,https://scout.uw.edu/tacoma,Scout: Discover the UW,no,,,,,,,,,,,,,
PageAcademics,Tools & Software,all,https://itconnect.uw.edu/wares/uware/tableau-software/,Tableau Data Analysis Software,,,,,,,no,,,,,,,,,,,,,
PageAcademics,Tools & Software,all,https://uw.hosted.panopto.com/,Panopto,,,,,,,yes,,,,,,,,,,,,,
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
2 changes: 1 addition & 1 deletion myuw/test/dao/test_category_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _test_ascii(self, s):

def test_get_all_links(self):
all_links = Res_Links.get_all_links()
self.assertEqual(len(all_links), 64)
self.assertEqual(len(all_links), 65)
val = URLValidator()
for link in all_links:
try:
Expand Down
12 changes: 10 additions & 2 deletions myuw/test/dao/test_term.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,20 +399,28 @@ def test_get_current_and_next_quarters(self):

def test_term_data_context_in_quarter(self):
request = get_request_with_date("2013-03-10")

context = {}
add_term_data_to_context(request, context)

self.assertEqual(context['year'], 2013)
self.assertEqual(context['quarter'], 'winter')
self.assertEqual(context['is_finals'], False)
self.assertEqual(context['is_break'], False)

self.assertEqual(context['summer_term'], "")
self.assertEqual(context['today'].year, 2013)
self.assertEqual(context['today'].month, 3)
self.assertEqual(context['today'].day, 10)
self.assertEqual(context['future_term'], "2013,spring")

request = get_request_with_date("2013-07-10")
context = {}
add_term_data_to_context(request, context)
self.assertEqual(context['summer_term'], "a-term")
request = get_request_with_date("2013-07-25")
context = {}
add_term_data_to_context(request, context)
self.assertEqual(context['summer_term'], "b-term")

def test_term_data_context_in_finals(self):
request = get_request_with_date("2013-03-22")

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
4 changes: 2 additions & 2 deletions myuw_vue/components/academics/grad-committee.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</div>
<div class="text-end">
<uw-link-button
href="https://grad.uw.edu/for-students-and-post-docs/mygrad-program/">
href="https://grad.uw.edu/mygrad-program/">
Go to MyGrad
</uw-link-button>
</div>
Expand All @@ -48,7 +48,7 @@
An error occurred and MyUW cannot load your committees request information
right now. In the meantime, try the
<a v-out="'MyGrad'"
href="https://grad.uw.edu/for-students-and-post-docs/mygrad-program/"
href="https://grad.uw.edu/mygrad-program/"
>MyGrad Program</a> page.
</template>
</uw-card>
Expand Down
4 changes: 2 additions & 2 deletions myuw_vue/components/academics/grad-status.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@

<div class="text-end">
<uw-link-button
href="https://grad.uw.edu/for-students-and-post-docs/mygrad-program/">
href="https://grad.uw.edu/mygrad-program/">
Go to MyGrad
</uw-link-button>
</div>
Expand All @@ -125,7 +125,7 @@
right now. In the meantime, try the
<a
v-out="'MyGrad'"
href="https://grad.uw.edu/for-students-and-post-docs/mygrad-program/"
href="https://grad.uw.edu/mygrad-program/"
>MyGrad Program</a> page.
</template>
</uw-card>
Expand Down

0 comments on commit 186d28b

Please sign in to comment.