-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[BD-32] feat: add cohort change Open edX Filter #29964
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
[BD-32] feat: add cohort change Open edX Filter #29964
Conversation
|
Thanks for the pull request, @mariajgrimaldi! I've created BLENDED-1108 to keep track of it in Jira. More details are on the BD-32 project page. When this pull request is ready, tag your edX technical lead. |
5288cab to
436b3cb
Compare
d07579a to
3b7398c
Compare
felipemontoya
left a comment
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.
This filter is working great. It does as advertised and nothing more.
|
However by playing around with this I noticed that we are missing a filter for the first time a user is placed in a cohort. This filter only responds to when the user already has a cohort and it is switching. |
|
@mariajgrimaldi 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
<!--
🌰🌰
🌰🌰🌰🌰 🌰 Note: the Nutmeg master branch has been created. Please consider whether your change
🌰🌰🌰🌰 should also be applied to Nutmeg. If so, make another pull request against the
🌰🌰🌰🌰 open-release/nutmeg.master branch, or ping @nedbat for help or questions.
🌰🌰
Please give your pull request a short but descriptive title.
Use conventional commits to separate and summarize commits logically:
https://open-edx-proposals.readthedocs.io/en/latest/oep-0051-bp-conventional-commits.html
Use this template as a guide. Omit sections that don't apply. You may link to information rather than copy it.
More details about the template are at openedx/openedx-proposals#180
(link will be updated when that document merges)
-->
## Description
Backport filters that didn't make it to nutmeg release:
**Add filter before certificate creation starts**
(cherry picked from commit e8fa890)
**Add cohort change filter before moving users from cohorts**
(cherry picked from commit 465e5c0)
**Add filter before certificate rendering process starts**
(cherry picked from commit 7f974d1)
**Add filter before course dashboard rendering process starts**
(cherry picked from commit 895a649)
**Add filter before course about rendering process starts**
(cherry picked from commit ccfa0b4)
**Integrate cohort assignment filter definition to cohort model**
(cherry picked from commit ec69659)
## Supporting information
Refer to the BTR wg github issue for the rationale behind this PR: openedx/wg-build-test-release#187
## Testing instructions
1. Install the needed library release: `openedx-filters==0.7.0`
2. Install the samples library:
`pip install git+https://github.com/eduNEXT/openedx-filters-samples.git@master#egg=openedx_filters_samples`
3. Then, configure each filter. If you want to test all the filters simultaneously, use this configuration and try to do each operation the filter is related to; the filter sample step will stop the operation.
```
OPEN_EDX_FILTERS_CONFIG = {
"org.openedx.learning.certificate.creation.requested.v1": {
"fail_silently": False,
"pipeline": [
"openedx_filters_samples.samples.pipeline.StopCertificateCreation"
]
},
"org.openedx.learning.cohort.change.requested.v1": {
"fail_silently": False,
"pipeline": [
"openedx_filters_samples.samples.pipeline.StopCohortChange"
]
},
"org.openedx.learning.certificate.render.started.v1": {
"fail_silently": False,
"pipeline": [
"openedx_filters_samples.samples.pipeline.RenderAlternativeCertificate",
]
},
"org.openedx.learning.dashboard.render.started.v1": {
"fail_silently": False,
"pipeline": [
"openedx_filters_samples.samples.pipeline.RenderAlternativeDashboard",
]
},
"org.openedx.learning.course_about.render.started.v1": {
"fail_silently": False,
"pipeline": [
"openedx_filters_samples.samples.pipeline.RenderAlternativeCourseAbout",
]
},
"org.openedx.learning.cohort.assignment.requested.v1": {
"fail_silently": False,
"pipeline": [
"openedx_filters_samples.samples.pipeline.StopCohortAssignment"
]
},
}
```
Please, for detailed instructions on how to test each filter, refer to each of these PR(s):
Filter for certificate creation:
#29949
Filter for cohort change:
#29964
Filter for certificate rendering:
#29976
Filter for dashboard rendering:
#29994
Filter for course about rendering:
#29996
Filter for cohort assignment:
#30431
## Deadline
For the next nutmeg release.
Description
As part of the Hooks Extension Framework implementation plan, this PR adds a filter before the cohort assignment change process starts.
Supporting information
ADR(s) on:
Testing instructions
With this configuration, you won't be able to:
org.openedx.learning.cohort.change.requested.v1And with this one, the user's profile is modified
Straightforward implementations as a way of illustrating how they work. More complex steps are coming.