101 Commits

Author SHA1 Message Date
Taimoor Ahmed
86d9b08b5d feat: remove last cs_comments service references (#37503)
This commit removes all remaining references to cs_comments_service
except the ForumsConfig model. The only purpose of keeping the model
and table around is so that the webapp processes don't start throwing
errors during deployment because they're running the old code for a
few minutes after the database migration has run. We can drop
ForumsConfig and add the drop-table migration after Ulmo is cut.

Also bumps the openedx-forum version to 0.3.7

---------

Co-authored-by: Taimoor  Ahmed <taimoor.ahmed@A006-01711.local>
2025-10-23 10:48:39 -04:00
Taimoor Ahmed
4c051378d0 feat!: remove last calls to cs_comments_service (#37376)
This removes the last remaining code that called out to the
cs_comments_service. All forums backend logic now uses the v2 API from
the forum repo (https://github.com/openedx/forum). This does NOT remove
MongoDB support.

This also implements the endpoint to retrieve all comments for a user
using the new forum backend. This is not actually called from any known
frontend code, but it has not been formally deprecated as an endpoint,
and therefore needs to be supported.

As part of the cleanup, the ENABLE_FORUM_V2 course waffle flag has also
been removed, along with all remaining switching logic that used to
route between the Python API in the forum repo and service calls to the
cs_comments_service Ruby service.

Other endpoints affected (switching logic removed):

* get course commentable counts
* get/update course user stats
* update comment/thread/user
* delete thread (implementation moved to forum repo)
* follow
* retire user

This is part of the following overall DEPR ticket:
  https://github.com/openedx/cs_comments_service/issues/437
2025-10-08 11:36:52 -04:00
Ali-Salman29
539666dc40 feat!: remove cs_comments_service support for forum's content APIs
- This will force the use of the new v2 forum's APIs for Threads & Comment.
- Update params for get_user_subscription function. It uses the same structure as we have in the get_user_threads.
2025-09-15 09:10:06 -04:00
ayesha waris
2a2942bc7f feat: automatically follow post when creating comments/responses (#37318)
* feat: automatically follow  post while createing comments/responses

* feat: follow post when a comment or response is created

* test: updated tests

---------

Co-authored-by: Ayesha Waris <ayesha.waris@192.168.10.28>
Co-authored-by: Muhammad Adeel Tajamul <muhammadadeeltajamul@hotmail.com>
2025-09-12 13:10:39 +05:00
Ahtisham Shahid
c2a86534e6 fix: updated captcha api to use enterprise assessment (#37079)
* fix: updated captcha api to use enterprise assessment
2025-08-03 21:27:12 +00:00
Muhammad Adeel Tajamul
b658470f8b feat: added configurable ratelimit feature in discussions (#37094) 2025-07-31 17:35:10 +05:00
Ali-Salman29
d29171c046 feat!: remove cs_comments_service support for forum's subscription APIs
- This will force the use of the new v2 forum's APIs for subscriptions.
2025-07-29 10:44:37 -04:00
Muhammad Adeel Tajamul
ef6dbd9e03 chore: added email verified in course view api (#37046) 2025-07-21 16:32:28 +05:00
Ahtisham Shahid
cf93ba2974 feat: added captcha validation in discussion thread/comment creation api (#37015) 2025-07-16 18:02:43 +05:00
Hassan Raza
a60b8f8d2c chore: Track 'notify all learners' option in event data (#36962)
* chore: Track 'notify all learners' option in event data

* fix: unit test
2025-06-30 14:54:11 +05:00
Hassan Raza
8fac3bc060 feat: Add notify all learners option for discussion post (#36922)
* feat: Add notify all learners option for discussion post

* fix: Remove waffle flag from default notification dict
2025-06-27 15:25:22 +05:00
Ali-Salman29
e0fbb96ee7 feat!: remove cs_comments_service support for forum's search APIs
This will force the use of the new v2 forum's APIs for searching.
2025-06-26 13:18:56 -04:00
Ali-Salman29
c82490393d feat!: remove cs_comments_service support for forum's vote APIs
This will force the use of the new v2 forum's APIs for voting/unvoting.
2025-05-27 10:42:05 -04:00
Ali-Salman29
6f522f3992 feat!: remove cs_comments_service support for forum's flag APIs
This will force the use of the new v2 forum's APIs for flaging/unflaging.
2025-05-22 10:24:52 -04:00
ayesha waris
610906218a fix: stoped group TA to see the posts of other cohorts (#36765)
* fix: stoped group TA to see the posts of other cohorts

* test: updated test cases

---------

Co-authored-by: Ayesha Waris <ayesha.waris@192.168.10.31>
2025-05-22 18:55:22 +05:00
Régis Behmo
065adf398e feat: reapply forum v2 changes (#36002)
* feat: Reapply "Integrate Forum V2 into edx-platform"

This reverts commit 818aa343a2.

* feat: make it possible to globally disable forum v2 with setting

We introduce a setting that allows us to bypass any course waffle flag
check. The advantage of such a setting is that we don't need to find the
course ID: in some cases, we might not have access to the course ID, and
we need to look for it... in forum v2.

See discussion here: https://github.com/openedx/forum/issues/137

* chore: bump openedx-forum to 0.1.5

This should fix an issue with index creation on edX.org.
2024-12-12 12:18:33 +05:00
Diana Huang
818aa343a2 Revert "feat: Integrate Forum V2 into edx-platform"
This reverts commit 70b60ff256.
2024-12-06 11:19:06 -05:00
Muhammad Faraz Maqsood
70b60ff256 feat: Integrate Forum V2 into edx-platform
This commit introduces the new Forum V2 application, allowing users to choose between the legacy Forum V1 and the new Forum V2 at the course level.

Key Changes:
- Added waffle flag `discussions.enable_forum_v2` to enable Forum V2 for selected courses, allowing coexistence with Forum V1.
- Default data storage for Forum V2 is set to MongoDB, with an option to switch to MySQL using the waffle flag `forum_v2.enable_mysql_backend`.
- Introduced management command `forum_migrate_course_from_mongodb_to_mysql` for per-course data migration from MongoDB to MySQL.

Note: This PR does not include all unit tests for the Forum V2 native API due to ongoing migration efforts. Further updates will follow to ensure full test coverage before final release.

Co-authored-by: [Muhammad Faraz Maqsood] <faraz.maqsood@arbisoft.com>
Co-authored-by: [Ali Salman] <ali.salman@arbisoft.com>
2024-12-03 11:00:51 -05:00
ayesha waris
3bc03b33ac fix: fixed permissions for voted (#34993)
* fix: fixed permissions for voted

* fix: fixed test cases
2024-06-26 15:55:48 +05:00
Ahtisham Shahid
cb14a9261a feat: added new v2 for course config api (#34804) 2024-05-23 14:46:44 +05:00
ayesha waris
c913a55b17 feat: updated api to get all question type reponses (#34215)
* feat: updated api to get all question type reponses

* test: fixed and added new test cases
2024-02-29 11:58:07 +05:00
ayesha waris
fc86b431af feat: modified author labels to add moderator (#34239)
Co-authored-by: sohailfatima <23100065@lums.edu.pk>
2024-02-15 20:43:30 +05:00
ayesha waris
53270f17b3 chore: removed and merged multiple flags into enable_discussions_mfe flag (#33983) 2024-01-12 15:07:00 +05:00
Muhammad Adeel Tajamul
30c029f119 feat: added comment_endorsed, thread_followed and thread_unfollowed signals in mfe api (#33944) 2023-12-29 11:29:31 +05:00
Ahtisham Shahid
2495120d89 chore: removed enable_moderation_reason_codes flag from discussion app (#33822)
* chore: removed enable_moderation_reason_codes flag from discussion app
2023-12-06 11:05:56 +05:00
KyryloKireiev
ae3830b023 feat: [AXIM-20] Add profile_image to API CommentViewSet 2023-11-14 21:45:18 +02:00
SaadYousaf
bef05ab664 feat: add tracking event for following post 2023-10-14 02:00:34 +05:00
Ahtisham Shahid
22e2a23b9f feat: add new notifiction type for discussions post followers (#33009)
feat: added model for subscription

feat: added logic for notifaction to followers
2023-10-12 13:03:02 +05:00
Muhammad Adeel Tajamul
3aeaec35d9 feat: added notifications in legacy discussion experience (#33280) 2023-09-21 08:04:02 +05:00
Ahtisham Shahid
aec8fcd559 fix: use disabled as default for posting_restrictions (#33159) 2023-09-05 15:44:10 +05:00
Muhammad Adeel Tajamul
4efd54a3fd feat: added new_question_post and new_discussion_post notification (#33043) 2023-08-31 14:29:21 +05:00
Ahtisham Shahid
b477a20ad2 Added notifications for discussions events (#32432)
* 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
2023-07-06 13:33:20 +05:00
ayesha waris
abac77e106 feat: adds ability to disable posting in discussions indefinitely (#32171)
* 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>
2023-05-23 15:08:06 +05:00
Muhammad Adeel Tajamul
2f036e2df6 feat: added edit_by_label and closed_by_label in threads response (#32070) 2023-04-19 19:55:10 +05:00
SaadYousaf
32e792d1f4 feat: add differentiation for tracking in-context and mfe events 2023-03-09 07:32:00 +05:00
Muhammad Adeel Tajamul
9f7bba85fc feat: added reverse_order param in comments sort (#31667)
Co-authored-by: adeel.tajamul <adeel.tajamul@arbisoft.com>
2023-02-13 12:58:13 +05:00
0x29a
fd191db332 refactor: rename module (or item) -> block within remaining lms
Also, removed `_iter_scorable_xmodules` method from `lms/djangoapps/grades/transformer.py` file.
2023-01-30 18:15:23 +01:00
Arunmozhi
d417a7561f refactor: rename ItemFactory to BlockFactory 2023-01-23 14:47:47 +01:00
Robert Raposa
6c7618fed0 fix: remove flaky test_staff_response test
The test test_staff_response failed and then passed
and subsequent runs with the same code, and is now
considered flaky. It is being removed in accordance with
this flaky test process: https://2u-internal.atlassian.net/wiki/spaces/TE/pages/12812492/Flaky+Test+Process
Note: the Flaky+Test+Process doc should probably be more
public, but simply notes that these tests should be removed
with a ticket to allow the owning team to fix it.

Here is a link to the job where it failed and passed: 
https://github.com/openedx/edx-platform/actions/runs/3752596945/jobs/6375603154
2022-12-21 16:35:12 -05:00
ayesha waris
ecc9a7c3e3 Merge pull request #31336 from openedx/INF-628
fix: course_staff and course_admin added in get_course api
2022-12-01 16:35:13 +05:00
Mehak Nasir
8be2b7355b fix: thread will only be returned for matching course ID (#31340) 2022-12-01 16:17:19 +05:00
ayeshoali
1363fcb501 fix: test cases fixed 2022-12-01 14:36:57 +05:00
SaadYousaf
c0631c320e fix: legacy coverage and add missing properties for reported events 2022-11-17 13:03:47 +05:00
SaadYousaf
17df3d4e17 feat: add discussion reported and unreported events 2022-11-01 15:57:13 +05:00
SaadYousaf
c79c41e0a3 fix: filter out discussion topics that have not started yet for instructor paced courses 2022-10-13 23:15:46 +05:00
Ahtisham Shahid
c2696c07fc fix: updated topic sorting for discussions MFE (#31124)
* fix: updated topic sorting for discussions MFE

* feat: updated topic sorting test case
2022-10-13 15:09:19 +05:00
Saad Yousaf
3423feb4fd Revert "fix: filter out discussion topics that have not started yet."
This reverts commit 54b5d59fc3.
2022-10-08 14:58:14 +05:00
SaadYousaf
54b5d59fc3 fix: filter out discussion topics that have not started yet. 2022-10-07 15:17:12 +05:00
SaadYousaf
6aca8abe87 feat: add event for edited content in discussions 2022-10-03 15:00:03 +05:00
SaadYousaf
85a8b39735 feat: add event for content deletion for discussions 2022-09-21 13:20:58 +05:00