Skip to content

feat: adding CCX support to edx notes#38665

Open
luisfelipec95 wants to merge 1 commit into
openedx:masterfrom
Pearson-Advance:lfc/add-support-ccx-notes
Open

feat: adding CCX support to edx notes#38665
luisfelipec95 wants to merge 1 commit into
openedx:masterfrom
Pearson-Advance:lfc/add-support-ccx-notes

Conversation

@luisfelipec95
Copy link
Copy Markdown
Contributor

@luisfelipec95 luisfelipec95 commented May 26, 2026

Description

This PR addresses an issue where notes created within a CCX are not displayed in the Notes tab.

The root cause is a mismatch in the course_id used when saving versus retrieving notes:

  • When a note is saved, the course_id includes branch and version
  • When the Notes tab fetches notes, it uses the CCX course_id without branch or version

This inconsistency causes the Notes tab to return no results for CCX notes, even though they were successfully saved.

Proposed Solution

This PR standardizes the course_id used when persisting notes to ensure consistency between write and read operations.

For CCX courses, the course_id may include branch and version information, which is not consistently used across consumers such as the Notes tab. This change normalizes the identifier for CCX contexts before saving, ensuring that stored notes can be reliably retrieved.

This approach aligns how course_id is handled across services while preserving existing behavior for non-CCX courses.

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

Thanks for the pull request, @luisfelipec95!

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

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

Copy link
Copy Markdown
Contributor

@ormsbee ormsbee left a comment

Choose a reason for hiding this comment

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

I think the approach of removing version info from the key makes total sense. Please also write a test to ensure this behavior. Thank you!

# Use camelCase to name keys.
"usageId": self.scope_ids.usage_id,
"courseId": course.id,
"courseId": course.id if not is_ccx_course(course.id) else course.id.for_branch(branch=None),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can't we always do course.id.for_branch(branch=None) regardless of what kind of course it is? If so, please do that, and put a comment above explaining why.

Also, please make this a "fix:" not a "feature:". I realize the net effect allows people to use notes in CCX courses, which is great, but it was always intended to work in courses.

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.

4 participants