-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add/remove course staff role events #267
Changes from all commits
67c40a7
00c0e8f
e722cda
b5f6bf7
5c3a984
0b88629
557f8bc
b043e09
a28bc7f
b49dd99
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
more information about the project. | ||
""" | ||
|
||
__version__ = "8.7.0" | ||
__version__ = "8.8.0" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -329,3 +329,46 @@ class ExamAttemptData: | |
usage_key = attr.ib(type=UsageKey) | ||
exam_type = attr.ib(type=str) | ||
requesting_user = attr.ib(type=UserData, default=None) | ||
|
||
|
||
@attr.s(frozen=True) | ||
class ManageStudentsPermissionData: | ||
""" | ||
Attributes defined for the Open edX to represent users that can manage students within a course/org. | ||
|
||
IMPORTANT: | ||
edX currently uses roles, and only roles, to decide what kind of access a user has. | ||
|
||
There is an ongoing project to replace this roles-only system with a system that uses roles that are | ||
made up of permissions, which is being worked on in parallel with another project to emit events | ||
whenever users are assigned any type of "Course Staff" role. | ||
|
||
It's unclear what the state of this roles/permissions project will be the time the events project | ||
is completed, so each project's respective teams will stay in touch with each other. | ||
|
||
For now, we're making a best effort to publish this an event that will regard the permission(s) | ||
we'd expect to "filter" for in the future (For more info, please check out this document: | ||
https://docs.google.com/spreadsheets/d/1htsV0eWq5-y96DZ5A245ukfZ4_qeH0KjHVaOyfqD8OA/edit#gid=908503896) | ||
and not for the roles we have now. Likely this/these permission(s) will be something like `manage_students`, | ||
but we need to evaluate how this will align with some possible future roles such as `limited_staff` or `ccx`. | ||
|
||
As such, the current plan is to do one of the following once the roles/permissions project's | ||
feature branch is merged to master: | ||
1. Modify this event to "filter" by the correct permissions once the | ||
2. As a backup plan, make a new event if this proves too difficult. | ||
|
||
Until either of these plans are executed, this comment under the IMPORTANT header should stay put. | ||
|
||
Arguments: | ||
user (UserData): User who will have a role/permission assigned/removed. | ||
permission (str): The permission the user is being assigned. | ||
course_key (Course ID): identifier of the course where the user will have staff role assigned/removed. | ||
A blank course_id implies org wide role. | ||
org (str): identifier of the org where the user will have staff role assigned/removed. | ||
A blank org is for global group based roles such as course creator (may be deprecated). | ||
""" | ||
|
||
user = attr.ib(type=UserData) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. which other fields do you think would be useful? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added some other fields based on the current parameters that CourseAccessRole currently takes: https://github.com/openedx/edx-platform/blob/master/common/djangoapps/student/roles.py#L448 Please note that this is subject to change in the future due to the concurrent roles/permissions project that is being done (see the "IMPORTANT:" comment in the event data for more details). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's better. Thank you! |
||
permission = attr.ib(type=str) | ||
course_key = attr.ib(type=str, default=None) | ||
org = attr.ib(type=str, default=None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this! I totally missed it.