Skip to content

Conversation

@amirhossein-haerian
Copy link
Contributor

This PR updates the memo statistics logic.
Previously, course offerings for each semester were retrieved from KOPPS and then filtered using fields like first_yearsemester, first_period, and offered_semesters. 
These offerings were matched to memos using the course_round_application_code, and statistics were generated based on memo presence, publication timing, and course data. 
In the new implementation, offerings are retrieved from Ladok instead, using startperiod as the basis for selecting relevant data. While startperiod may not always reflect the exact teaching start date, it is assumed to be the most reliable and consistent way to retrieve all offerings for a given semester. Using förstaUndervisningsdatum and attempting to map it to a Ladok period is not feasible, particularly for summer courses that don't fit cleanly into VT or HT formats (I would be grateful to know your opinion about it, please let me know if you think startPeriod is not a good property to get all offerings for a semester 🙏). 

Memo matching now uses tillfälleskod. The result is a set of course offerings for the selected semesters and periods, matched with their respective memos, which is then aggregated into statistics per school; such as total number of offerings, how many had memos, and how many memos were published before course start or deadline.

Copy link
Contributor

@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.

Looks really good! Well done ⭐ Gone through and tested locally.

Would be nice to let Susanne or someone from the verksamhet to test this thoroughly, as we don't have the requirements clear. I see that the number of hits differ between the old and new implementation, which maybe is OK. But it shouldn't be up to us to decide 🙏

@amirhossein-haerian
Copy link
Contributor Author

Looks really good! Well done ⭐ Gone through and tested locally.

Would be nice to let Susanne or someone from the verksamhet to test this thoroughly, as we don't have the requirements clear. I see that the number of hits differ between the old and new implementation, which maybe is OK. But it shouldn't be up to us to decide 🙏

Thanks for the comment, I completely agree with you. Maybe we can wait until they come back from vacation for more clarification before we merge the changes. we can discuss this in our stand-up as well 🙌

@amirhossein-haerian amirhossein-haerian marked this pull request as draft August 28, 2025 07:35
@amirhossein-haerian
Copy link
Contributor Author

We will come back to this PR after the changes regarding the fallback approach for creation of kthPeriods are done.

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.

3 participants