Commit Graph

27 Commits

Author SHA1 Message Date
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
Mehak Nasir
b6ee28310e feat: added not responded filter for fetch thread list api (#31275) 2022-11-11 14:56:01 +05:00
Muhammad Adeel Tajamul
06ac5ed4b0 feat: added sort by recent activity for activity stats api (#31252)
Co-authored-by: adeel.tajamul <adeel.tajamul@arbisoft.com>
2022-11-07 11:15:01 +05:00
SaadYousaf
28a8e618ac feat: add partial username search for course discussion user stats 2022-06-30 17:37:03 +05:00
Abdurrahman Asad
f22a129b23 fix: discussion moderators can't create posts for specific cohorts (#30352)
fix: discussion moderators can't create posts for specific cohorts
2022-05-11 09:41:48 +05:00
Kshitij Sobti
23be63309b feat: Add a new user API for discussions (#29287)
Adds a new user API for discussion that returns the discussion stats across the course.
2022-02-01 17:51:01 +05:00
Kshitij Sobti
2758301c31 feat: Discussion Topics API v2 [BD-38] [TNL-9332] [BB-5189] (#29530)
* feat: New API for discussion topics

Creates a new API for discussion topics that uses auto-crated discussion topic links for the new discussion provider.

* squash!: refresh migration
2022-01-31 15:57:49 +05:00
Felipe Trzaskowski
c0e19ec165 Add new discussions API endpoints to retrieve comments and threads from an user [BD-38] [TNL-8796] [BB-4969] (#29137)
* feat: add api mapping to get comments by course+user

fix: merge the new user comments API by overloading the thread comments API

fix: handle endorsements and fix broken tests

fix: improve the view documentation

fix: unused imports

fix: restrict flagged filter to privileged users

fix: validate course_id properly

* fix: add docstring to the retrieve_all method
2022-01-04 11:21:47 +05:00
Kshitij Sobti
dd6e908635 feat: Add support for pinning and closing threads, adds a preview and a delete check field (#28809)
Adds support for pinning and closing threads to the current REST APIs for discusions.
Adds a preview_body field to the thread response that contains a truncated version of the raw body with tags removed so it can be shown in previews.
Adds a field called "can_delete" to threads and comments that signals if the current user is able to delete that resource.
2021-10-01 19:57:12 +05:00
Kshitij Sobti
423ac00809 Makes counting flagged comments optional, instead of automatic in case of moderators 2021-07-14 13:19:12 +05:00
Aayush Agrawal
ffe3ee3869 feat: Adds additional data and filters to discussions API
This change adds three new filters to the threads API. They are:
* Filtering only threads that are flagged for abuse
* Filtering by the thread type (discussion or question)
* Filtering by the thread author

In addition it also adds a new ``abuse_flagged_count`` field for threads. It
returns a count of the number of comments in a thread that are flagged for abuse.
This is only visible to users that have moderator privileges or higher.

Finally it also adds a ``abuse_flagged_any_user`` field that is set if any user
has flagged a thread. This field too, is only visible to moderators or above.

Co-authored-by: Kshitij Sobti <kshitij@opencraft.com>
2021-07-14 13:19:12 +05:00
Usama Sadiq
f74d7c9ea7 refactor: pyupgrade second iteration 2021-04-30 15:35:47 +05:00
Jawayria
707f940770 Refactor: Removed unused imports
Removed unused imports from lms/djangoapps/{course_wiki, coursewarehistoryextended, discussion}
2021-04-07 12:54:21 +05:00
edX requirements bot
f33f12bbea BOM-2358 : Pyupgrade in dashboard, debug, discussion apps (#26529)
* Python code cleanup by the cleanup-python-code Jenkins job.

This pull request was generated by the cleanup-python-code Jenkins job, which ran
```
cd lms/djangoapps/dashboard; find . -type f -name '*.py' | while read fname; do sed -i 's/  # lint-amnesty, pylint: disable=super-with-arguments//; s/  # lint-amnesty, pylint: disable=import-error, wrong-import-order//; s/  # lint-amnesty, pylint: disable=wrong-import-order//' "$fname"; done; find . -type f -name '*.py' | while read fname; do pyupgrade --exit-zero-even-if-changed --py3-plus --py36-plus --py38-plus "$fname"; done; isort --recursive .
```

The following packages were installed:
`pyupgrade,isort`

* feedback done

Co-authored-by: Zulqarnain <muhammad.zulqarnain@arbisoft.com>
2021-02-22 15:42:21 +05:00
M. Zulqarnain
65cf0db337 BOM-2278 : Pylint amnesty in discussion, dashboard (#26275)
* pylint amnesty in discussion, dashboard
2021-02-03 18:15:14 +05:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Zulqarnain
34bece208a Fix discussion notif pref tests 2020-03-30 16:01:06 +05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Stu Young
13e624a50b INCR-307 Run python-modernize on lms/djangoapps/discussion/rest_api (#20618)
* run python modernize

* run isort

* Fix quality
2019-05-28 12:51:49 -04:00
Nimisha Asthagiri
dfa3728edf Move django_comment_common from common to openedx 2019-05-03 12:10:18 -04:00
Nimisha Asthagiri
c606aaeb57 Discussion consolidation: quality 2019-05-03 12:09:47 -04:00
Nimisha Asthagiri
b949452eb2 Move discussion_api to discussion/rest_api 2019-05-03 12:07:21 -04:00
Nimisha Asthagiri
ef0e06cc0a Revert "Discussions consolidation" 2019-05-02 14:59:56 -04:00
Nimisha Asthagiri
df962a31b7 Move django_comment_common to openedx/core/djangoapps/discussion_common 2019-05-01 19:15:02 -04:00
Nimisha Asthagiri
c2e232a3d4 Discussion consolidation: quality 2019-05-01 19:13:10 -04:00
Nimisha Asthagiri
3d1bb23809 Move discussion_api to discussion/rest_api 2019-05-01 19:13:10 -04:00