-
Notifications
You must be signed in to change notification settings - Fork 16
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: adds the CourseEnrollmentSiteFilterRequested filter #47
feat: adds the CourseEnrollmentSiteFilterRequested filter #47
Conversation
Thanks for the pull request, @JuanDavidBuitrago! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
af48a08
to
4640e69
Compare
Hi @mariajgrimaldi and @felipemontoya, could you help me review this? |
0eb7d1e
to
4879bd5
Compare
4879bd5
to
9af35fb
Compare
Hi @mariajgrimaldi!!! Could you check again the last changes? Thanks!! 😃 |
5d02252
to
0b69a66
Compare
openedx_filters/learning/filters.py
Outdated
|
||
class CourseEnrollmentQuerysetRequested(OpenEdxPublicFilter): | ||
""" | ||
Custom class used to filter user's course enrollments by site, when a request is made by the user. |
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.
Great description! The issue is that not many people will use this filter as described here. That type of documentation goes to the pipeline steps. I suggest something like:
Custom class used to filter user's course enrollments by site, when a request is made by the user. | |
Custom class used to create course enrollments queryset filters and its custom methods. |
This following the other filters docstrings.
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.
Thanks @mariajgrimaldi, I modified this part.
openedx_filters/learning/filters.py
Outdated
|
||
filter_type = "org.openedx.learning.course_enrollment_queryset.requested.v1" | ||
|
||
class PreventEnrollmentSiteFilter(OpenEdxFilterException): |
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.
It would help if you changed the name here too
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.
Yes, you're right. I forgot to change this.
Thanks for your comments. Could you check again?
openedx_filters/learning/filters.py
Outdated
|
||
class PreventCourseEnrollmentQueryset(OpenEdxFilterException): | ||
""" | ||
Custom class used to stop the course enrollment queryset filter process. |
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.
Custom class used to stop the course enrollment queryset filter process. | |
Custom class used to stop the course enrollment queryset request process. |
openedx_filters/learning/filters.py
Outdated
|
||
filter_type = "org.openedx.learning.course_enrollment_queryset.requested.v1" | ||
|
||
class PreventCourseEnrollmentQueryset(OpenEdxFilterException): |
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.
The wording here could be clearer. I like better: PreventEnrollmentQuerysetRequest, what do you folks think?
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.
It's ok, I agree with that. Let me know if you consider another change.
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.
Just one last comment :). Let me know how it goes!
Thank you, @mariajgrimaldi I made some changes, could you check again? |
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.
LGTM
@JuanDavidBuitrago 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
Description:
This adds the
CourseEnrollmentSiteFilterRequested
filter which receive a Query Set context with enrollments information to allowing the filter pipeline to return the information that we need to filter.An example of use is in eox-tenant custom filter step pipeline, where it takes the enrollments information and is filtered by tenant request, returning only the enrollments in the current site for the user.
JIRA: N/A
Dependencies:
Merge deadline: N/A
Installation instructions:
Be sure to use
edx-platform
branch with changes openedx/edx-platform#31331Testing instructions:
The change can be tested with testing instructions in eox-tenant plugin.
Reviewers:
Merge checklist:
Post merge:
finished.
Author concerns: N/A