@require_POST
@login_required
@permitted
def flag_abuse_for_comment(request, course_id, comment_id):
 course_key = CourseKey.from_string(course_id)
 user = cc.User.from_django_user(request.user)
 comment = cc.Comment.find(comment_id)
 comment.flagAbuse(user, comment)
 return JsonResponse(prepare_content(comment.to_dict(), course_key))

@ require_POST @ login_required @ permitted def flag_abuse_for_comment ( request , course_id , comment_id ) : course_key = CourseKey . from_string ( course_id ) user = cc . User . from_django_user ( request . user ) comment = cc . Comment . find ( comment_id ) comment . flagAbuse ( user , comment ) return JsonResponse ( prepare_content ( comment . to_dict ( ) , course_key ) )
given a course and comment id .