UniversityOfHelsinkiCS / oodikone

An application for analyzing university data
https://oodikone.helsinki.fi
MIT License
14 stars 6 forks source link

[Class statistics] Curriculum period dropdown not working #4495

Closed rikurauhala closed 4 months ago

rikurauhala commented 4 months ago

The curriculum period selection dropdown appears to be bugged for some programmes.

For example see Sosiaalitieteiden kandiohjelma, 2020

Expected list:

Actual list:

ShootingStar91 commented 4 months ago

bugged.... or feature? 🤔

valtterikantanen commented 4 months ago

Based on the curriculumPeriodIds in the db, there's still a problem with how the curriculum periods are displayed in the frontend. We have curriculumPeriodIds

['hy-lv-69', 'hy-lv-68', 'hy-lv-70']
['hy-lv-72', 'hy-lv-73']
['hy-lv-71']
['hy-lv-76', 'hy-lv-74', 'hy-lv-75']

in the db. These should be displayed as (without the explanation in parentheses)

2017-2020 (academic years from 2017-2018 through 2019-2020)
2021-2023 (academic years 2021-2022 and 2022-2023)
2020-2021 (academic year 2020-2021)
2023-2026 (academic years from 2023-2024 through 2025-2026)

This probably should be refactored to use the same logic as with determining correct curriculum period for individual students.