lms.djangoapps.discussion.django_comment_client.base package#
Submodules#
lms.djangoapps.discussion.django_comment_client.base.event_transformers module#
Transformers for Discussion-related events.
- class lms.djangoapps.discussion.django_comment_client.base.event_transformers.ForumThreadViewedEventTransformer(*args, **kwargs)#
Bases:
EventTransformerTransformer for forum-thread-viewed mobile navigation events.
- match_key = 'edx.bi.app.navigation.screen'#
- process_event()#
Process incoming mobile navigation events.
For forum-thread-viewed events, change their names to edx.forum.thread.viewed and manipulate their data to conform with edx.forum.thread.viewed event design.
Throw out other events.
lms.djangoapps.discussion.django_comment_client.base.tests_v2 module#
lms.djangoapps.discussion.django_comment_client.base.urls module#
Base urls for the django_comment_client.
lms.djangoapps.discussion.django_comment_client.base.views module#
Views for discussion forums.
- lms.djangoapps.discussion.django_comment_client.base.views.add_truncated_title_to_event_data(event_data, full_title)#
- lms.djangoapps.discussion.django_comment_client.base.views.ajax_content_response(request, course_key, content)#
Standard AJAX response returning the content hierarchy of the current thread.
- lms.djangoapps.discussion.django_comment_client.base.views.create_comment(request, course_id, thread_id)#
given a course_id and thread_id, test for comment depth. if not too deep, call _create_comment to create the actual comment.
- lms.djangoapps.discussion.django_comment_client.base.views.create_sub_comment(request, course_id, comment_id)#
given a course_id and comment_id, create a response to a comment after checking the max depth allowed, if allowed
- lms.djangoapps.discussion.django_comment_client.base.views.create_thread(request, course_id, commentable_id)#
Given a course and commentable ID, create the thread
- lms.djangoapps.discussion.django_comment_client.base.views.delete_comment(request, course_id, comment_id)#
given a course_id and comment_id delete this comment ajax only
- lms.djangoapps.discussion.django_comment_client.base.views.delete_thread(request, course_id, thread_id)#
given a course_id and thread_id, delete this thread this is ajax only
- lms.djangoapps.discussion.django_comment_client.base.views.endorse_comment(request, course_id, comment_id)#
given a course_id and comment_id, toggle the endorsement of this comment, ajax only
- lms.djangoapps.discussion.django_comment_client.base.views.flag_abuse_for_comment(request, course_id, comment_id)#
given a course and comment id, flag comment for abuse ajax only
- lms.djangoapps.discussion.django_comment_client.base.views.flag_abuse_for_thread(request, course_id, thread_id)#
given a course_id and thread_id flag this thread for abuse ajax only
- lms.djangoapps.discussion.django_comment_client.base.views.follow_commentable(request, course_id, commentable_id)#
given a course_id and commentable id, follow this commentable ajax only
- lms.djangoapps.discussion.django_comment_client.base.views.follow_thread(request, course_id, thread_id)#
- lms.djangoapps.discussion.django_comment_client.base.views.openclose_thread(request, course_id, thread_id)#
given a course_id and thread_id, toggle the status of this thread ajax only
- lms.djangoapps.discussion.django_comment_client.base.views.permitted(func)#
View decorator to verify the user is authorized to access this endpoint.
- lms.djangoapps.discussion.django_comment_client.base.views.pin_thread(request, course_id, thread_id)#
given a course id and thread id, pin this thread ajax only
- lms.djangoapps.discussion.django_comment_client.base.views.track_comment_created_event(request, course, comment, commentable_id, followed, from_mfe_sidebar=False)#
Send analytics event for a newly created response or comment.
- lms.djangoapps.discussion.django_comment_client.base.views.track_comment_deleted_event(request, course, comment)#
Send analytics event for a deleted response or comment.
- lms.djangoapps.discussion.django_comment_client.base.views.track_comment_edited_event(request, course, comment, edit_reason_code)#
Send analytics event for an edited response or comment.
- lms.djangoapps.discussion.django_comment_client.base.views.track_comment_reported_event(request, course, comment)#
Send analytics event for a reported response or comment.
- lms.djangoapps.discussion.django_comment_client.base.views.track_comment_unreported_event(request, course, comment)#
Send analytics event for a unreported response or comment.
- lms.djangoapps.discussion.django_comment_client.base.views.track_created_event(request, event_name, course, obj, data)#
Send analytics event for a newly created thread, response or comment.
- lms.djangoapps.discussion.django_comment_client.base.views.track_discussion_reported_event(request, course, cc_content)#
Helper method for discussion reported events.
- lms.djangoapps.discussion.django_comment_client.base.views.track_discussion_unreported_event(request, course, cc_content)#
Helper method for discussion unreported events.
- lms.djangoapps.discussion.django_comment_client.base.views.track_forum_event(request, event_name, course, obj, data, id_map=None)#
Send out an analytics event when a forum event happens. Works for threads, responses to threads, and comments on those responses.
- lms.djangoapps.discussion.django_comment_client.base.views.track_forum_response_mark_event(request, course, cc_content, value)#
Helper method for discussions response mark event
- lms.djangoapps.discussion.django_comment_client.base.views.track_forum_search_event(request, course, search_event_data)#
Send analytics event for discussions related search.
- lms.djangoapps.discussion.django_comment_client.base.views.track_response_mark_event(request, course, comment, thread, action_name)#
Send analytics event for response that is marked as endorsed or answered.
- lms.djangoapps.discussion.django_comment_client.base.views.track_thread_created_event(request, course, thread, followed, from_mfe_sidebar=False, notify_all_learners=False)#
Send analytics event for a newly created thread.
- lms.djangoapps.discussion.django_comment_client.base.views.track_thread_deleted_event(request, course, thread)#
Send analytics event for a deleted thread.
- lms.djangoapps.discussion.django_comment_client.base.views.track_thread_edited_event(request, course, thread, edit_reason_code)#
Send analytics event for an edited thread.
- lms.djangoapps.discussion.django_comment_client.base.views.track_thread_followed_event(request, course, thread, followed)#
Send analytics event for a newly followed/unfollowed thread.
- lms.djangoapps.discussion.django_comment_client.base.views.track_thread_lock_unlock_event(request, course, thread, close_reason_code, locked=True)#
Triggers edx.forum.thread.locked and edx.forum.thread.unlocked tracking event
- lms.djangoapps.discussion.django_comment_client.base.views.track_thread_reported_event(request, course, thread)#
Send analytics event for a reported thread.
- lms.djangoapps.discussion.django_comment_client.base.views.track_thread_unreported_event(request, course, thread)#
Send analytics event for a unreported thread.
- lms.djangoapps.discussion.django_comment_client.base.views.track_thread_viewed_event(request, course, thread, from_mfe_sidebar=False)#
Send analytics event for a viewed thread.
- lms.djangoapps.discussion.django_comment_client.base.views.track_voted_event(request, course, obj, vote_value, undo_vote=False)#
Send analytics event for a vote on a thread or response.
- lms.djangoapps.discussion.django_comment_client.base.views.un_flag_abuse_for_comment(request, course_id, comment_id)#
given a course_id and comment id, unflag comment for abuse ajax only
- lms.djangoapps.discussion.django_comment_client.base.views.un_flag_abuse_for_thread(request, course_id, thread_id)#
given a course id and thread id, remove abuse flag for this thread ajax only
- lms.djangoapps.discussion.django_comment_client.base.views.un_pin_thread(request, course_id, thread_id)#
given a course id and thread id, remove pin from this thread ajax only
- lms.djangoapps.discussion.django_comment_client.base.views.undo_vote_for_comment(request, course_id, comment_id)#
given a course id and comment id, remove vote ajax only
- lms.djangoapps.discussion.django_comment_client.base.views.undo_vote_for_thread(request, course_id, thread_id)#
given a course id and thread id, remove users vote for thread ajax only
- lms.djangoapps.discussion.django_comment_client.base.views.unfollow_commentable(request, course_id, commentable_id)#
given a course id and commentable id stop following commentable ajax only
- lms.djangoapps.discussion.django_comment_client.base.views.unfollow_thread(request, course_id, thread_id)#
given a course id and thread id, stop following this thread ajax only
- lms.djangoapps.discussion.django_comment_client.base.views.update_comment(request, course_id, comment_id)#
given a course_id and comment_id, update the comment with payload attributes handles static and ajax submissions
- lms.djangoapps.discussion.django_comment_client.base.views.update_thread(request, course_id, thread_id)#
Given a course id and thread id, update a existing thread, used for both static and ajax submissions
- lms.djangoapps.discussion.django_comment_client.base.views.upload(request, course_id)#
view that handles file upload via Ajax
- lms.djangoapps.discussion.django_comment_client.base.views.users(request, course_id)#
Given a username query parameter, find matches for users in the forum for this course.
Only exact matches are supported here, so the length of the result set will either be 0 or 1.
- lms.djangoapps.discussion.django_comment_client.base.views.vote_for_comment(request, course_id, comment_id, value)#
Given a course_id and comment_id, vote for this response. AJAX only.
- lms.djangoapps.discussion.django_comment_client.base.views.vote_for_thread(request, course_id, thread_id, value)#
given a course id and thread id vote for this thread ajax only