Skip to content

feat: add PERSISTENT_SUBSECTION_GRADE_CHANGED#587

Open
bmtcril wants to merge 6 commits into
mainfrom
bmtcril/subsection-grade
Open

feat: add PERSISTENT_SUBSECTION_GRADE_CHANGED#587
bmtcril wants to merge 6 commits into
mainfrom
bmtcril/subsection-grade

Conversation

@bmtcril

@bmtcril bmtcril commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Description

(Rebase of #545 )

We already have a PERSISTENT_GRADE_CHANGED event, but we do not have a corresponding event for the subsection.

This mostly borrows the field data already calculated for openedx-platform's SUBSECTION_GRADE_CALCULATED tracking event.

I don't love the fact that we are putting the model name in the event name (PersistentSubsectionGrade), but I think it's better to be consistent with the already existing convention for emitting the course grade change event.

This event is necessary for CBE work, which will react to these events in order to determine competency at a skill.

Still needs testing in platform, so in draft.

Checklists

Check off if complete or not applicable:

Merge Checklist:

  • All reviewers approved
  • Reviewer tested the code following the testing instructions
  • CI build is green
  • Version bumped
  • Changelog record added with short description of the change and current date
  • Documentation updated (not only docstrings)
  • Integration with other services reviewed
  • Fixup commits are squashed away
  • Unit tests added/updated
  • Noted any: Concerns, dependencies, migration issues, deadlines, tickets

Post Merge:

  • Create a tag
  • Create a release on GitHub
  • Check new version is pushed to PyPI after tag-triggered build is
    finished.
  • Delete working branch (if not needed anymore)
  • Upgrade the package in the Open edX platform requirements (if applicable)

@bmtcril bmtcril force-pushed the bmtcril/subsection-grade branch from 74210d9 to bc0cd07 Compare July 2, 2026 16:34
@bmtcril bmtcril changed the title Bmtcril/subsection grade feat: add PERSISTENT_SUBSECTION_GRADE_CHANGED Jul 2, 2026
Per ADR 7, we need to mark optional fields with defaults or they raise
exceptions.

graded = attr.ib(type=bool)
raw_possible = attr.ib(type=float)
weight = attr.ib(type=float, default=None)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@ormsbee I needed to add this to keep the event compatible, see ADR 7. I didn't fun across any other optional fields in the new data types in testing, but if you know of any lmk so I can annotate them correctly.

@bmtcril bmtcril marked this pull request as ready for review July 8, 2026 20:23
@bmtcril bmtcril requested review from a team and ormsbee July 8, 2026 20:23
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