learningequality / learningequality/studio
Develop Content Flagging UI Modal
Open
@vkWeb is already working on this.
Since Dec 23, 2023.
DEV: frontend
javascript
P1 - important
TAG: new feature
- Dominant language
- Python
- Stars
- 191
- Forks
- 307
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 10
Description
Overview
This issue aims to create a modal that will be triggered when a user clicks on the "Flag" option associated with a specific content node. The modal will provide predefined checkboxes for common reasons for flagging regarding why they believe the content should be flagged. We would also want to implement proper logic to accumulate all the parameters required to create a FlagFeedbackEvent object and call the utility functions to make the API request to the backend.
Description and outcomes
- Create a Vue component for the flag modal.
- Trigger the modal when the user clicks on the "Flag" option associated with a content node.
- The Checkboxes should have the following options:
- Violent or repulsive content
- Hateful or abusive content
- Harmful or dangerous acts
- Spam or misleading
- Sexual Content
- User should be able to check multiple checkboxes.
- Capture user selections made with the checkboxes provided in the
feedback_reasonfield of theFlagFeedbackEventClass. - In the
ContentNodeOptionsvue component, add a method that would be triggered when the user completes the procedure of flagging content. - This method should retrieve the corresponding parameter values required to create an instance of
FlagFeedbackEvent Classi.euser,target_channel_id,context, contentnode_id,content_id,feedback_type,feedback_reason,target_topic_idfor the ContentNode. - Create an object of
FlagFeedbackEventClass and make an API request usingsendRequestutility functions implemented in feedbackApiUtils.js.
Related Screenshot
- The modal should look something similar to this with an option to submit selected !
Acceptance criteria
- UI modal with checkboxes for retrieving feedback_reason from the user trying to flag a contentNode.
- Above mentioned methods triggered and implemented correctly according to specifications provided above.
Resources
- To understand more about
FlagFeedbackEventClass refer to #4366
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.