Skip to content

fix: refresh earned scores after content scoring edits - #596

Open
Yeagerist0 wants to merge 1 commit into
adeyosemanputra:masterfrom
Yeagerist0:fix/rescore-content-edits
Open

Yeagerist0 wants to merge 1 commit into
adeyosemanputra:masterfrom
Yeagerist0:fix/rescore-content-edits

Conversation

@Yeagerist0

Copy link
Copy Markdown
Contributor

Description

Changing a challenge’s points or assigning a different difficulty to a challenge/lab does not update existing scores. Add content post-save handlers that reuse _write_score for completed records of that exact content type and ID. Read persisted settings, ignore fixture writes and unrelated partial saves, and leave unfinished content unscored.

Reproduction and validation

Tests change challenge points, challenge difficulty and lab difficulty, checking that same-ID content of the other type stays unchanged and unfinished completions receive no score. Three cases failed before the fix.

All 22 scoring tests pass on Django 4.2/Python 3.11. Fatal-error lint and diff checks pass; makemigrations reports no changes.

No live targets or Docker labs were used.

Codex assisted with reproduction, implementation, and tests.

Copilot AI balanced review requested due to automatic review settings November 28, 2026 16:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
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