Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lms/djangoapps/edxnotes/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from xblock.exceptions import NoSuchServiceError

from common.djangoapps.edxmako.shortcuts import render_to_string
from common.djangoapps.student.auth import is_ccx_course


def edxnotes(cls):
Expand Down Expand Up @@ -56,7 +57,7 @@ def get_html(self, *args, **kwargs):
"params": {
# 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.

"token": get_edxnotes_id_token(user),
"tokenUrl": get_token_url(course.id),
"endpoint": get_public_endpoint(),
Expand Down
Loading