openedx / openedx-events

Open edX events from the Hooks Extensions Framework
Apache License 2.0
11 stars 21 forks source link

feat: new enterprise transaction data/signals #347

Closed iloveagent57 closed 2 months ago

iloveagent57 commented 3 months ago

Context

The best doc to start with is probably this: https://github.com/openedx/enterprise-access/blob/main/docs/decisions/0004-add-access-policy-functionality.rst#context

A Ledger is a model defined in the openedx-ledger repo, it's a core model used in the context of edX Enterprise. https://github.com/openedx/openedx-ledger/blob/main/docs/decisions/0002-ledger-balance-enforcement.rst

It's installed only into enterprise-subsidy AFAIK: https://github.com/openedx/enterprise-subsidy/tree/main/docs/decisions

I don't believe ledgers (or enterprise-subsidy,access) to be used widely by the community - my guess is that 2u is the only entity currently using it. These new events will be used to relay state transitions from enterprise-subsidy back to enterprise-access so that a related record, LearnerContentAssignment, can update its state based on the new state of its related transaction. https://github.com/openedx/enterprise-access/blob/main/docs/decisions/0012-assignment-based-policies.rst https://github.com/openedx/enterprise-access/blob/430d768ee4c6355b353e22f5b0f7902d169850bc/enterprise_access/apps/content_assignments/models.py#L234

Reviewers:

Merge checklist:

Post merge:

Author concerns: List any concerns about this PR - inelegant solutions, hacks, quick-and-dirty implementations, concerns about migrations, etc.

iloveagent57 commented 3 months ago

Sorry, meant to open as a draft. Still not ready for review.

iloveagent57 commented 3 months ago

@openedx/hooks-extension-framework this PR is now ready for review, thanks in advance!

iloveagent57 commented 3 months ago

There are some unmerged PRs that use those deprecated fields. My plan is to write new PRs to use these new signals and close the unmerged PRs. https://github.com/openedx/enterprise-subsidy/pull/227 https://github.com/openedx/enterprise-access/pull/434

mariajgrimaldi commented 3 months ago

I don't have much time to get this done this week, so I'll take a look early next week. Thank you!

iloveagent57 commented 3 months ago

@mariajgrimaldi gentle reminder about this open PR.

mariajgrimaldi commented 3 months ago

@iloveagent57, thanks for the patience! Reviewing now.

mariajgrimaldi commented 2 months ago

I appreciate your patience! I have one last comment for you to address, then we can merge. Please feel free to ping me (on here or on slack) once this is ready to be reviewed again.

mariajgrimaldi commented 2 months ago

The new tag is out: https://github.com/openedx/openedx-events/releases/tag/v9.11.0