Skip to content

[BD-38][BB-6681] feat: add count_flagged query param to the learner thread endpoint - #31048

Merged
asadazam93 merged 1 commit into
openedx:masterfrom
open-craft:0x29a/bb6681/count_flagged
Oct 12, 2022
Merged

[BD-38][BB-6681] feat: add count_flagged query param to the learner thread endpoint#31048
asadazam93 merged 1 commit into
openedx:masterfrom
open-craft:0x29a/bb6681/count_flagged

Conversation

@0x29a

@0x29a 0x29a commented Sep 27, 2022

Copy link
Copy Markdown
Contributor

Description

Adds count_flagged query parameter to the forum Learner Thread endpoint, which allows platform moderators to see how posts were flagged per given user's thread.

Supporting information

Testing instructions

  1. Install this branch and [BD-38][BB-6681] feat: add support of the count_flagged query param to the learner threads endpoint openedx-unsupported/cs_comments_service#393 to your devstack.
  2. Enroll into some course.
  3. As a stuff user, open Discussions, create a thread, and leave a few replies.
  4. As a regular user, enroll into the same course, open Discussions, and flag some of the replies.
  5. As a stuff user, open <LMS_URL>/api/discussion/v1/courses/<URL_ENCODED_COURSE_ID>/learner/?username=<STAFF_USERNAME>&page=1&count_flagged=true — resulting JSON document has to contain "abuse_flagged_count": <number_of_flagged_replies>.

@openedx-webhooks openedx-webhooks added the blended PR is managed through 2U's blended developmnt program label Sep 27, 2022
@openedx-webhooks

openedx-webhooks commented Sep 27, 2022

Copy link
Copy Markdown

Thanks for the pull request, @0x29a!

When this pull request is ready, tag your edX technical lead.

@0x29a 0x29a changed the title [WIP][BD-38][BB-6681] feat: add count_flagged query param to the learner thread endpoint [BD-38][BB-6681] feat: add count_flagged query param to the learner thread endpoint Sep 28, 2022

@xitij2000 xitij2000 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

  • I tested this: tested on devstack
  • I read through the code
  • Includes documentation

Comment thread lms/djangoapps/discussion/rest_api/views.py
@asadazam93
asadazam93 merged commit 062a760 into openedx:master Oct 12, 2022
@openedx-webhooks

Copy link
Copy Markdown

@0x29a 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@0x29a
0x29a deleted the 0x29a/bb6681/count_flagged branch October 12, 2022 12:06
@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blended PR is managed through 2U's blended developmnt program

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants