Skip to content

Fix mastery criterion publishing#3684

Merged
bjester merged 1 commit intolearningequality:hotfixesfrom
rtibbles:mastery_not_yet_100
Sep 30, 2022
Merged

Fix mastery criterion publishing#3684
bjester merged 1 commit intolearningequality:hotfixesfrom
rtibbles:mastery_not_yet_100

Conversation

@rtibbles
Copy link
Copy Markdown
Member

Summary

Description of the change(s) you made

  • Fixes completely wrong logic in the publish code for extracting the mastery model
  • Consolidates logic from the viewset to reuse in publishing too
  • Adds tests for proper publishing of both old format and new format mastery models (at top level of extra_fields, and in the completion criteria)

Manual verification steps performed

  1. Wrote a regression test, saw that it failed.
  2. Fixed the behaviour.
  3. Regression test passed.

Fixes #3676

…e with publishing of new format mastery models.
Copy link
Copy Markdown
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.

LGTM

if exercise_data.get('mastery_model'):
exercise_data_type = exercise_data.get('mastery_model')
if (
exercise_data.get('option') and
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AH! option should have been options 🤦

@bjester bjester merged commit a81113b into learningequality:hotfixes Sep 30, 2022
@rtibbles rtibbles deleted the mastery_not_yet_100 branch September 30, 2022 14:12
@bjester bjester mentioned this pull request Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants