Add additional completion to exercises that have already had their completion criteria fixed but their complete value is still wrong#5731
Conversation
…mpletion criteria fixed but their complete value is still wrong
9a8c05b to
b2984a0
Compare
bjester
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
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.