Skip to content

Conversation

@mgwozdz-unicon
Copy link

@mgwozdz-unicon mgwozdz-unicon commented Feb 4, 2026

Description

  • Updates to enable functional REST API for CBE Assessment Criteria
  • Updates to enable openedx-events SubsectionGradeChanged event to function

Related ADRs: openedx/openedx-learning#466

This is for a backend POC of an end-to-end CBE Assessment Criteria workflow.

  1. Given an administrator has uploaded a Taxonomy to Studio and given a Course Author's Organization permission to use it.
  2. A Course Author can associate a tag to a Subsection Assignment in Studio.
  3. A Developer can review this association in the API and/or DB to find the primary key id of the tag as well as the primary key id of the object_tag association.
  4. A Developer can POST to create an Assessment Criteria Group listing the primary key id of the tag as the competency_tag value. For example:
curl --location 'http://studio.local.openedx.io:8001/api/assessment_criteria/v1/criteria-groups/' \
--header 'X-Csrftoken: PbpYDMtK6MvdxWc7o9bllJ78IRZJ3vya' \
--header 'Content-Type: application/json' \
--header 'Cookie: csrftoken=PbpYDMtK6MvdxWc7o9bllJ78IRZJ3vya; openedx-language-preference=en; studio_session_id=1|krksvugufz3fzadubrgogyzv7zc22zkd|hpVmvY4h89w8|ImEwN2Y5NGE2MzE3OWZhMWJkNTkxMjI4NWU3MWRmYjllZWQ5MDg0MmU3Y2E5YmE4ZjE3MzhjNDcxZmE5NjY1ZmEi:1vnMTG:seudq0KK-qxR4-KqezcK4dogwqan5C9_ce1KiE7Wcto' \
--data '{
  "parent": null,
  "competency_tag": 42,
  "name": "Cylinder",
  "ordering": 1,
  "logic_operator": "AND"
}'
  1. A Developer can POST to create an Assessment Criteria listing the primary key id of the tag as the competency_tag value and the primary key id of the object_tag association as the object_tag value as well as the primary key id of the Assessment Criteria Group as the group value. For example:
curl --location 'http://studio.local.openedx.io:8001/api/assessment_criteria/v1/criteria/' \
--header 'X-Csrftoken: jBuyDS0JKuGsEyhIHbzcBqjqPyeZNs3d' \
--header 'Content-Type: application/json' \
--header 'Cookie: csrftoken=jBuyDS0JKuGsEyhIHbzcBqjqPyeZNs3d; openedx-language-preference=en' \
--data '{
  "group": 5,
  "object_tag": 27,
  "competency_tag": 42,
  "rule_type": "Grade",
  "rule_payload": {"op": "gte", "value": 75, "scale": "percent"},
  "retake_rule": "MostRecent"
}'
  1. A learner can now complete problems in the associated subsection assignment, which will trigger the grade event and an update to their assessment criteria and competency status values.
  2. A Developer can observe the changes in the learner's assessment criteria and competency status values via the API or DB.

Supporting information

Related Technical Design Document: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/5604573185/Competency+Assessment+Criteria+Technical+Design+Document

Testing instructions

Pytest:

pytest lms/djangoapps/grades/tests/test_events.py -k persistent_subsection

For manual testing:

# Verify mounts inside container is in /mnt dir
tutor dev exec lms ls -la /mnt/openedx-events
tutor dev exec lms ls -la /mnt/openedx-learning
# Install local openedx-events
tutor dev exec lms pip install -e /mnt/openedx-events
tutor dev exec cms pip install -e /mnt/openedx-events
# Run event consumer in CMS
tutor dev exec cms ./manage.py cms consume_events \
  -t learning-subsection-grade \
  -g openedx-learning \
  --extra '{"consumer_name":"openedx-learning-1"}'

This needs to be run in the CMS because the LMS does not contain openedx-learning as a dependency.
Once this change and the corresponding changes for the openedx-learning repo are in place and db migrations are completed, then you can proceed with the testing steps described above in the description.

Deadline

It would be great to have some feedback within the next week or two.

Other information

Depends on the changes here, including DB migrations: openedx/openedx-learning#473

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Feb 4, 2026
@openedx-webhooks
Copy link

Thanks for the pull request, @mgwozdz-unicon!

This repository is currently maintained by @openedx/wg-maintenance-openedx-platform.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Submit a signed contributor agreement (CLA)

⚠️ We ask all contributors to the Open edX project to submit a signed contributor agreement or indicate their institutional affiliation.
Please see the CONTRIBUTING file for more information.

If you've signed an agreement in the past, you may need to re-sign.
See The New Home of the Open edX Codebase for details.

Once you've signed the CLA, please allow 1 business day for it to be processed.
After this time, you can re-run the CLA check by adding a comment below that you have signed it.
If the CLA check continues to fail, you can tag the @openedx/cla-problems team in a comment for further assistance.

🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

🔘 Update the status of your PR

Your PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate.


Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

2 participants