Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issues in course analysis statistics tool #387

Merged

Conversation

karlandindrakryggen
Copy link
Contributor

@karlandindrakryggen karlandindrakryggen commented Nov 12, 2024

The main changes that addresses reported issue:

  • faulty week logic for determining semester is removed and only now semester from Kopps is used.
  • only one semester can be selected, to avoid issues of added same course offering multiple time.
  • ST as selection is removed, course offerings will be included in HT och VT depending on semester from Kopps (ST was caluclated from weeks before and is no actual semester)

The PR aslo include some other fixes for different warnings:

  • replaced rendering of <StatisticsAlert> through document.getElementById() and createRoot() to by moving useStatisticsAsync one step up in react tree and rendering it the normal React way
  • removed used of deprecated defaultProps
  • some style fixes in chart and tables

…gic.

The main changes are:
- faulty week logic for determining semester is removed and only now semester from Kopps is used.
- only one semester can be selected, to avoid issues of added same course offering multiple time.
- ST is removed, course offerings will be included in HT och VT depending on semester from Kopps (ST was caluclated from weeks before and is no actual semester)
@karlandindrakryggen karlandindrakryggen force-pushed the issues/KUI-1585-course-analysis-statistics branch from 46364cd to 7277aa6 Compare November 12, 2024 12:44
chosenSchool = '',
language = 'sv'
) {
function filterOfferingsForAnalysis(courses = [], chosenSemester, chosenSchool = '', language = 'sv') {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most notable changes are in this function.

@karlandindrakryggen
Copy link
Contributor Author

Copy link
Contributor

@axelbjo axelbjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on my machine and it works fine! Nice job with the refactoring the logic surrounding seasons/semesters, it looks a lot less convoluted and unclear now.

Copy link

@allazis allazis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Ran locally and clicked around. A lot cleaner now, having the semesters corresponding to KOPPS semesters, and the new table styling that makes it possible to actually see the end date right away.

Good job!

Copy link
Contributor

@amirhossein-haerian amirhossein-haerian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done ⭐️
I also tested locally and everything looks great.

@karlandindrakryggen karlandindrakryggen merged commit 42bd5b0 into master Nov 14, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants