Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate existing mastery criteria handling into completion criteria #3339

Closed
3 of 4 tasks
bjester opened this issue Mar 11, 2022 · 1 comment
Closed
3 of 4 tasks
Labels
DEV: backend P0 - critical Priority: Release blocker or regression

Comments

@bjester
Copy link
Member

bjester commented Mar 11, 2022

Background

  • Follow up to Support adding completion criteria and validating its structure #3318
  • Exercise resources have mastery criteria and historically it lives in the ContentNode.extra_fields JSON object
  • With the addition of completion criteria, we've created something similar to mastery for all other content kinds, and completion criteria can also contain mastery criteria
  • We should consolidate the existing mastery criteria into completion criteria in a runtime migration of sorts, but pulling it from the existing location and serving it within the completion criteria until saved in this way

Desired behavior

  • The ExtraFieldsSerializer should no longer accept mastery_model, m, or n fields:
    • When serializing, and if those fields are set in the source data and completion criteria is unset, the serializer should return those fields instead as properly formatted completion criteria in ContentNode.extra_fields.options.completion_criteria (see for more details), which will essentially migrate it to the new format when saved
  • Locations querying against the old mastery criteria should be updated such that if those fields no longer exist, it checks the completion_criteria for the new format. Examples:

Out of scope

  • The frontend should be updated separately as we'll be consolidating the mastery criteria form inputs into the new completion criteria handling, but have discretion on whether to wait until that's completed to merge this if it significantly breaks resource editing
@rtibbles
Copy link
Member

Fixed in #3426

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DEV: backend P0 - critical Priority: Release blocker or regression
Projects
None yet
Development

No branches or pull requests

3 participants