Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lms/djangoapps/discussion/django_comment_client/base/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ def track_comment_reported_event(request, course, comment):
obj_type = 'comment' if comment.get('parent_id') else 'response'
event_name = _EVENT_NAME_TEMPLATE.format(obj_type=obj_type, action_name='reported')
event_data = {
'discussion': {'id': comment.thread_id},
'body': comment.body[:TRACKING_MAX_FORUM_BODY],
'truncated': len(comment.body) > TRACKING_MAX_FORUM_BODY,
'commentable_id': comment.get('commentable_id', ''),
Expand Down Expand Up @@ -405,6 +406,7 @@ def track_comment_unreported_event(request, course, comment):
obj_type = 'comment' if comment.get('parent_id') else 'response'
event_name = _EVENT_NAME_TEMPLATE.format(obj_type=obj_type, action_name='unreported')
event_data = {
'discussion': {'id': comment.thread_id},
'body': comment.body[:TRACKING_MAX_FORUM_BODY],
'truncated': len(comment.body) > TRACKING_MAX_FORUM_BODY,
'commentable_id': comment.get('commentable_id', ''),
Expand Down
2 changes: 2 additions & 0 deletions lms/djangoapps/discussion/rest_api/tests/test_api_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ def test_abuse_flagged(self, old_flagged, new_flagged, mock_emit):
else "edx.forum.response.unreported"
)
expected_event_data = {
"discussion": {'id': 'test_thread'},
"body": "Original body",
"id": "test_comment",
"content_type": "Response",
Expand Down Expand Up @@ -902,6 +903,7 @@ def test_comment_un_abuse_flag_for_moderator_role(
"body": "Original body",
"id": "test_comment",
"content_type": "Response",
"discussion": {'id': 'test_thread'},
"commentable_id": "dummy",
"truncated": False,
"url": "",
Expand Down
Loading