Skip to content

feat/criteria groups and integration(#672-02) - #3276

Closed
AShatsila wants to merge 2 commits into
openedx:masterfrom
AShatsila:ashatsila/672-02-criteria-groups-and-integration
Closed

AShatsila wants to merge 2 commits into
openedx:masterfrom
AShatsila:ashatsila/672-02-criteria-groups-and-integration

Conversation

@AShatsila

Copy link
Copy Markdown
Contributor

Description

Second of two PRs for Manage & Apply Competencies (#672). It builds on <link to PR 1>. Until that PR merges, this PR's diff also shows its changes. To review only this PR's own changes, open the last commit, "feat: add criteria-groups UI and wire associations into the page".

  • Criteria-groups UI (criteria-groups/): shows the selected competency's existing associations, grouped by course:
    • one section per course (CourseGroupSection);
    • one card per criteria group (CriteriaGroupBox), with an All/Any operator label;
    • rule boxes that group criteria sharing the same score threshold (RuleBox, RuleBoxList);
    • one chip per associated subsection (CriterionChip, CriterionChipList).
  • Integration (associations/, course-search/): CompetencyAssociationsPanel wraps the course panel in CompetencyAssociationsProvider for the selected competency. CourseOutlineSubtree marks gradeable subsections that are already associated and associates a new one on click, into the focused group and rule box when one is set. CriteriaAssociationsSection shows the associations block above the course list.

Roles affected: Course Author (Competency Management page).

Supporting information

Testing instructions

These steps need a Studio instance with the openedx-core CBE API installed and openedx/openedx-platform#39099 applied.

  1. Open a competency taxonomy on the Competency Management page and select a leaf competency.
  2. In the course panel, expand a course, then a section, and click a graded subsection. It is associated: a course section with a group card and a chip appears in the associations block.
  3. Click another graded subsection in the same course. It joins the focused group and rule box.
  4. Click the already-associated subsection again. A toast says it is already associated, and no request is sent.
  5. Select a parent or child of a competency that already has criteria in that course, and associate a subsection there. A toast explains the hierarchy conflict.

Other information

  • Depends on <link to PR 1> and on the openedx-core CBE endpoints listed above, which are still in review.
  • The criteria-groups read is not yet scoped with course_keys (fix: active transcript preference not loading #682). It loads the competency's whole tree.
  • GET rule_profiles/ is currently restricted to taxonomy administrators. A course author who can tag content but is not a taxonomy admin gets a 403 there, and the associations block can't load. This is being raised with the backend team.

Best Practices Checklist

  • Any new files are using TypeScript (.ts, .tsx).
  • Avoid propTypes and defaultProps in any new or modified code.
  • Tests should use the helpers in src/testUtils.tsx (specifically initializeMocks)
  • Do not add new fields to the Redux state/store. Use React Context to share state among multiple components.
  • Use React Query to load data from REST APIs. See any apiHooks.ts in this repo for examples.
  • All new i18n messages in messages.ts files have a description for translators to use.
  • Avoid using ../ in import paths. To import from parent folders, use @src, e.g. import { initializeMocks } from '@src/testUtils'; instead of from '../../../../testUtils'

🤖 Generated with Claude Code

AShatsila and others added 2 commits September 29, 2026 17:13
Adds the API client, query hooks, types and index utilities for the CBE
criteria-groups, criteria and rule-profile endpoints, restores leaf-only
competency selection in the tree, and adds the associations context that
the criteria UI builds on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the course group, rule box and criterion chip components and wires
gradeable-subsection association selection into the competency
management page's course search panel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @AShatsila!

This repository is currently maintained by @bradenmacdonald.

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
🔘 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.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Sep 29, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions Sep 29, 2026
@AShatsila AShatsila changed the title Ashatsila/672 02 criteria groups and integration feat/criteria groups and integration(#672-02) Sep 29, 2026
@AShatsila AShatsila closed this Sep 29, 2026
@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.17391% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.12%. Comparing base (b98d86b) to head (5791516).

Files with missing lines Patch % Lines
...tency-management/CompetencyAssociationsContext.tsx 96.46% 4 Missing ⚠️
...cy-management/criteria-groups/CriteriaGroupBox.tsx 86.20% 4 Missing ⚠️
.../competency-management/criteria-groups/RuleBox.tsx 83.33% 4 Missing ⚠️
...management/criteria-groups/LogicOperatorSelect.tsx 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3276      +/-   ##
==========================================
+ Coverage   96.11%   96.12%   +0.01%     
==========================================
  Files        1427     1445      +18     
  Lines       34681    35129     +448     
  Branches     8293     8084     -209     
==========================================
+ Hits        33334    33769     +435     
- Misses       1290     1319      +29     
+ Partials       57       41      -16     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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: Done

Development

Successfully merging this pull request may close these issues.

2 participants