* feat: added notifications for discussions app
* feat: added unit tests for handler
* feat: updated openedx-events package
* fix: updated notification creation logic and tests
* refactor: updated openedx-event version and event name
* refactor: moved logic to separate methods
* feat: adds ability to disable posting in discussions indefinitely
* test: fixed ffailing test cases
* test: added new model field in test cases
* refactor: removes unnecessary migrations
* refactor: removed previous migrations and adds new field in discussions api
* refactor: added docstring and changed method name
---------
Co-authored-by: ayesha waris <73840786+ayeshoali@users.noreply.github.com>
Tracks a discussion topics' section and subsection in a new context field so that we have access to that information when the topic's section/subsection/unit has been deleted. This is then used when a topic is deleted to append the section and subsection name to the topic title.
ADR: https://github.com/openedx/edx-platform/pull/29928
The forum service doesn't get the requesting user id for any operation, only the user id of the content creator. So to apply a different user id for an editor or post closing user, those need to be explicitly passed.
Reason codes will be used by the frontend to list and validate the reasons for specifying moderation actions.
Co-authored-by: Kshitij Sobti <kshitij@opencraft.com>
Co-authored-by: Felipe Trzaskowski <felipe@opencraft.com>
Add `edit_reason_code` field to both `Comments` and `Threads`, making it
editable for anyone who can also edit `raw_body`.
Add `close_reason_code` field to `Threads`, and make it editable by
anyone who can also edit `closed`.
The new discusions MFE needs to know which provider is in use (legacy or new) to deliver the expected experience. This adds the provider name and other relevant configuration to the discussion configuraiton API.
Convert more tests from MONGO_AMNESTY to SPLIT modulestores.
This is in preparation for just wholesale denying access to Old
Mongo, so I either converted tests to split or just deleted some
test variants that were Old Mongo specific. (e.g. ddt lines)
It's long past time that the default test modulestore was Split,
instead of Old Mongo. This commit switches the default store and
fixes some tests that now fail:
- Tests that didn't expect MFE to be enabled (because we don't
enable MFE for Old Mongo) - opt out of MFE for those
- Tests that hardcoded old key string formats
- Lots of other random little differences
In many places, I didn't spend much time trying to figure out how to
properly fix the test, and instead just set the modulestore to Old
Mongo.
For those tests that I didn't spend time investigating, I've set
the modulestore to TEST_DATA_MONGO_AMNESTY_MODULESTORE - search for
that string to find further work.