Skip to content

Fix: count manual final scores towards module progress#146

Merged
Turnlings merged 3 commits into
Turnlings:mainfrom
EllMoorby:feature/manual-score-completion
Jul 14, 2026
Merged

Fix: count manual final scores towards module progress#146
Turnlings merged 3 commits into
Turnlings:mainfrom
EllMoorby:feature/manual-score-completion

Conversation

@EllMoorby

Copy link
Copy Markdown
Contributor

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

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

Pull Request Behaviour

The same setup has been created on this branch.
image

image Here the year actually now shows the 50% completion.

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_percentage returned 0 when a module had no assessments, before checking whether a final_score override existed, so modules with a manually entered final score but no assessments were incorrectly treated as incomplete.

UniModule#progress and UniModule#completion_percentage were 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.

@Turnlings Turnlings merged commit e423b90 into Turnlings:main Jul 14, 2026
2 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.

2 participants