Skip to content

Add additional completion to exercises that have already had their completion criteria fixed but their complete value is still wrong#5731

Merged
rtibbles merged 1 commit intolearningequality:hotfixesfrom
rtibbles:you_complete_me
Mar 11, 2026
Merged

Add additional completion to exercises that have already had their completion criteria fixed but their complete value is still wrong#5731
rtibbles merged 1 commit intolearningequality:hotfixesfrom
rtibbles:you_complete_me

Conversation

@rtibbles
Copy link
Member

@rtibbles rtibbles commented Mar 3, 2026

Summary

Further fixes to exercise completion. It appears that some are still not getting properly marked as complete, on inspection, it appears that they may already have had their completion criteria migrated by the frontend, but then never remarked as complete.
Fixes this by adding mark complete calls to all incomplete exercises.
Also adds the exercises command to the deploy step in the Makefile

References

Fixes #5667

Reviewer guidance

It is possible that this could mark otherwise "complete" exercises incomplete, should I guard against that?

AI usage

I used Claude to write the additional test, all other changes were by hand.

…mpletion criteria fixed but their complete value is still wrong
Copy link
Member

@bjester bjester left a comment

Choose a reason for hiding this comment

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

Changes make sense. Just one note about a situation that might be worth reporting, and caution on the deploy hook.

except (json.JSONDecodeError, ValueError):
return None, None
if not isinstance(ef, dict):
return None, None
Copy link
Member

Choose a reason for hiding this comment

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

Could the case of not was_complete and not isinstance(ef, dict) be a situation worth reporting? Just thinking about the situation where it may be legit missing the extra fields or criteria, and that's making it incomplete. I don't think we can fix it, but we could have insight into how many there are?

# 5) Repeat!
deploy-migrate:
echo "Nothing to do here!"
python contentcuration/manage.py fix_exercise_extra_fields
Copy link
Member

Choose a reason for hiding this comment

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

Since this script takes a really long time, we should be really conscious of merging other PRs to hotfixes. Ideally, we just don't. Alternatively, we could delay adding it here until we're ready to release, then release, then immediately remove it from hotfixes

@rtibbles rtibbles merged commit 050e85b into learningequality:hotfixes Mar 11, 2026
15 checks passed
@rtibbles rtibbles deleted the you_complete_me branch March 11, 2026 22:58
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