Fix: count manual final scores towards module progress#146
Merged
Turnlings merged 3 commits intoJul 14, 2026
Conversation
Turnlings
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixed an issue where manually overridden scores for modules would not add to semester completion percentage on the year screen when no assessments were added.
Example
Current Live Behaviour
I have created a test year and semester with two modules. Both modules are worth 10 credits. Module 1 has no overridden score and also no assessments. Module 2 has an overridden score of 50% and no assessments.

In the year view, there is a 25% score for the grade, but not for the actual completion.

Pull Request Behaviour
The same setup has been created on this branch.

Why?
Setting the override score likely means that the module has been completed, otherwise there would be no reason to set it. This speeds up setup time for new users who have already completed modules but don't want to assessments to all the modules.
What was changed?
Previously,
UniModule#completion_percentagereturned0when a module had no assessments, before checking whether afinal_scoreoverride existed, so modules with a manually entered final score but no assessments were incorrectly treated as incomplete.UniModule#progressandUniModule#completion_percentagewere also calculating the same value with slightly different behaviour, which caused inconsistent results depending on which method was used.The duplicate logic was removed by making both methods use the same completion calculation.