Open
Conversation
No permissions are granted for CCX courses, this is just a placeholder to keep these courses from erroring until we get to the LMS side
Contributor
Author
|
Test results
Tests with both RBAC and CCX enabled:
✳️ I had difficulties after running the migrate w/delete command and was forcibly logged out. Once I logged back in things worked as expected. |
Contributor
Author
NotesThese issues are unrelated to RBAC. CCX courses have the instructor dash, but...
The instructor dash MFE conversion team have been made aware of these issues. |
added 5 commits
April 3, 2026 11:14
Previously if there were any errors, success messages were eaten. Added message to state why no roles may have been migrated (already migrated, bad ids)
6cf67cb to
4b7f6ff
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR attempts to address the issues detailed in #235 . There are 4 overlapping sets of problems:
--deletecould cause the CCX course to be left in a state where there was no CCX Coach to run the course and rollback would not re-grant the roleThis PR addresses 1 and 2 by adding a
CCXCourseOverviewDataclass andCCX_COACHthat grant no permissions, but satisfy the checks for existence. This also allows theccx_coachrole to be migrated / rolled back without error.It addresses 3 by not allowing CCX courses to be migrated / rolled back using the migration scripts, and by better surfacing those errors.
It does not address 4 as that should happen as part of openedx/openedx-platform#38145 , but in that task it should throw an error if trying to turn on the RBAC flag for any non-course-v1 course until we are ready to support them.
It does not address other non-course-v1 locators. To the best of our (myself, Dave Ormsbee, Kyle McCormick) only know of one other possible case like this- Old Mongo keys. These are largely unsupported (do not work at all in Studio or Courseware, may not even show up on the student dashboard) and, as near as anyone can tell, un-testable.
If this approach looks good I will complete the rest of the merge checklist and update 38145 with details. This branch is tested in openedx-platform here.
Notes on CCX roles and permissions
staffrole on the CCX course as well.instructorandstaffon the CCX courseTesting
I do not expect anyone to do this, but here is what I did.
Setup
CUSTOM_COURSES_EDX: trueto the Tutor patch "common-env-features")a. Create through the normal UI
b. Log into studio as the user (will probably error, but creates a needed row in the database)
c. As superuser go to http://studio.local.openedx.io/admin/course_creators/coursecreator/
i. Your new user should show up in the list, mark them as "granted"
ii. Using "All Organizations" didn't work for me, courses wouldn't create, I had to add specific orgs to the user. You may have to create one first by creating a course as a superuser.
d. As superuser go to http://studio.local.openedx.io/admin/auth/user/
i. Click on your new user and mark them as "active" in the Permissions section, then save. !! There is an "is_active" flag under account recovery, that is the wrong one.
a. Create through the normal UI
b. Mark "active" in the Django admin as above
Test
All tests should complete without error.
a. Add some content / change course start date to a date in the past / publish
b. View in LMS
c. Get into correct configuration
If CCX:
i. As course creator: Studio -> Advanced Settings -> set CCX enabled
trueii. As course creator: Add the coach user to the course - LMS -> Instructor dashboard -> Membership -> Course Team Management -> CCX Coaches role, enter the coach username, add
iii. As coach: LMS -> CCX Coach -> CCX Coach Dashboard -> Enter name, create
iv. Due to an unrelated bug you must force publish the CCX course here before it will work: http://studio.local.openedx.io/admin/contentstore/courseoutlineregenerate/ (check the course box, from the "actions" box select "Regenerate selected course outlines", click "go")
v. Click through all of the CCX Coach Dashboard options, try everything
If RBAC:
i. Turn on the course override waffle flag for the parent and/or CCX course: http://studio.local.openedx.io/admin/waffle_utils/waffleflagcourseoverridemodel/
a. Add / change content
b. Publish
c. View in LMS, content should be up to date
Merge checklist:
Check off if complete or not applicable: