Skip to content
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 courseaccessrole events #309

Merged

Conversation

zacharis278
Copy link
Contributor

@zacharis278 zacharis278 commented Jan 29, 2024

Description: Creates new data class and events for publishing information about the creation or removal of an LMS CourseAccessRole. We are not planning to account for the roles and permissions changes at this point, events would be based on how roles currently work.

This will be consumed by edx-exams to sync access to instructor tools and actions on the API.

Author concerns: These events will be used instead those added by #267. I plan to remove those in a separate PR since there is no plan to use those event definitions or supporting data classes.

Merge checklist:

  • All reviewers approved
  • CI build is green
  • Version bumped
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Commits are squashed

Post merge:

  • Create a tag
  • Check new version is pushed to PyPI after tag-triggered build is
    finished.
  • Delete working branch (if not needed anymore)

@zacharis278 zacharis278 force-pushed the zhancock/course-access-role-events branch from 91059b7 to 603f0d2 Compare January 29, 2024 21:31
@@ -331,6 +331,24 @@ class ExamAttemptData:
requesting_user = attr.ib(type=UserData, default=None)


@attr.s(frozen=True)
class CourseAccessRoleData:

Choose a reason for hiding this comment

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

Reading the ManageStudentsPermissionData class defined below makes me wonder if we should refrain from using the word "role" in this class name. I know you've talked to more people about the roles + permissions work though, so I trust your judgement!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks. Yup the conclusion we came to was to define this as edx-platform exists today rather than trying to guess the future. I kept the name specific to the LMS model so it's use is clear instead of a ambiguous half-measure that might be reusable in the future.

There's no longer a near term path to the permission changes getting merged as we had originally wanted to account for. I'm not sure manage students will even end up being the correct permission when that the time does come to use permissions over roles.

Choose a reason for hiding this comment

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

Got it, appreciate the explanation! This looks good then 👍

@zacharis278 zacharis278 marked this pull request as ready for review January 30, 2024 17:48
@zacharis278 zacharis278 requested a review from a team as a code owner January 30, 2024 17:48
Copy link
Member

@felipemontoya felipemontoya left a comment

Choose a reason for hiding this comment

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

This addition of the events seems reasonable and well structured to me.

The removal of the other events will probably create a breaking change, but that can be discussed in its own PR.

@zacharis278
Copy link
Contributor Author

thanks @felipemontoya. I don't have write access to merge this. Is that something you can do or do I need to ping a specific maintainer?

Copy link
Member

@mariajgrimaldi mariajgrimaldi left a comment

Choose a reason for hiding this comment

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

Thank you folks! I'll be merging this now.

@mariajgrimaldi mariajgrimaldi merged commit 5d340fd into openedx:main Feb 1, 2024
8 checks passed
@mariajgrimaldi
Copy link
Member

@zacharis278 zacharis278 deleted the zhancock/course-access-role-events branch February 13, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants