From 6cc1e450fefacabb84f4975214a9b8621c0e5ceb Mon Sep 17 00:00:00 2001 From: Fang Lin Date: Mon, 22 Jul 2024 14:18:22 -0700 Subject: [PATCH 1/4] Resolve MUWM-5344 --- myuw/data/category_links_import.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/myuw/data/category_links_import.csv b/myuw/data/category_links_import.csv index 96fc39a36..b9d50ec69 100644 --- a/myuw/data/category_links_import.csv +++ b/myuw/data/category_links_import.csv @@ -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,,,,,,,,,,,,, From 0ad13da5900842d3073943331986275c8ddb6ae1 Mon Sep 17 00:00:00 2001 From: Fang Lin Date: Mon, 22 Jul 2024 14:29:34 -0700 Subject: [PATCH 2/4] Update MyGrad href --- myuw_vue/components/academics/grad-committee.vue | 4 ++-- myuw_vue/components/academics/grad-status.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/myuw_vue/components/academics/grad-committee.vue b/myuw_vue/components/academics/grad-committee.vue index 989c1f8f2..e12777a13 100644 --- a/myuw_vue/components/academics/grad-committee.vue +++ b/myuw_vue/components/academics/grad-committee.vue @@ -39,7 +39,7 @@
+ href="https://grad.uw.edu/mygrad-program/"> Go to MyGrad
@@ -48,7 +48,7 @@ An error occurred and MyUW cannot load your committees request information right now. In the meantime, try the MyGrad Program page. diff --git a/myuw_vue/components/academics/grad-status.vue b/myuw_vue/components/academics/grad-status.vue index 29c07a061..eacde4905 100644 --- a/myuw_vue/components/academics/grad-status.vue +++ b/myuw_vue/components/academics/grad-status.vue @@ -115,7 +115,7 @@
+ href="https://grad.uw.edu/mygrad-program/"> Go to MyGrad
@@ -125,7 +125,7 @@ right now. In the meantime, try the MyGrad Program page. From 9c8a5cd0fcdbabec648d7143d41508cbbdce1507 Mon Sep 17 00:00:00 2001 From: Fang Lin Date: Mon, 22 Jul 2024 14:48:32 -0700 Subject: [PATCH 3/4] fix test --- myuw/test/dao/test_category_links.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myuw/test/dao/test_category_links.py b/myuw/test/dao/test_category_links.py index f1bfb276f..0123ebef4 100644 --- a/myuw/test/dao/test_category_links.py +++ b/myuw/test/dao/test_category_links.py @@ -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: From d8f0a560ef7ce8988e93bbd15577f701c820b865 Mon Sep 17 00:00:00 2001 From: Fang Lin Date: Tue, 23 Jul 2024 14:42:49 -0700 Subject: [PATCH 4/4] Fix/muwm 5350 (#3129) Resolve MUWM-5350 --- myuw/dao/iasystem.py | 2 +- myuw/dao/term.py | 7 ++++--- myuw/dao/visual_schedule.py | 1 - myuw/templates/base.html | 1 + myuw/test/dao/test_term.py | 12 ++++++++++-- .../_common/course/student/course-cards.vue | 2 +- 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/myuw/dao/iasystem.py b/myuw/dao/iasystem.py index 523f99980..4df4ab19d 100644 --- a/myuw/dao/iasystem.py +++ b/myuw/dao/iasystem.py @@ -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 diff --git a/myuw/dao/term.py b/myuw/dao/term.py index 68949fd95..839d0cfb7 100644 --- a/myuw/dao/term.py +++ b/myuw/dao/term.py @@ -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" @@ -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 diff --git a/myuw/dao/visual_schedule.py b/myuw/dao/visual_schedule.py index b9538d8da..927df4ca4 100644 --- a/myuw/dao/visual_schedule.py +++ b/myuw/dao/visual_schedule.py @@ -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 * diff --git a/myuw/templates/base.html b/myuw/templates/base.html index fc720d264..3eb2bfd19 100644 --- a/myuw/templates/base.html +++ b/myuw/templates/base.html @@ -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"}}, diff --git a/myuw/test/dao/test_term.py b/myuw/test/dao/test_term.py index 10c995ef6..a96e49756 100644 --- a/myuw/test/dao/test_term.py +++ b/myuw/test/dao/test_term.py @@ -399,7 +399,6 @@ 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) @@ -407,12 +406,21 @@ def test_term_data_context_in_quarter(self): 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") diff --git a/myuw_vue/components/_common/course/student/course-cards.vue b/myuw_vue/components/_common/course/student/course-cards.vue index 9fa32dfc7..97c80a6d9 100644 --- a/myuw_vue/components/_common/course/student/course-cards.vue +++ b/myuw_vue/components/_common/course/student/course-cards.vue @@ -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) {