def handle_activity(user, post, original_author_id=None):
 if ((original_author_id is not None) and (user.id != original_author_id)):
  return
 if (getattr(post, 'context', 'course') == TEAM_DISCUSSION_CONTEXT):
  CourseTeamMembership.update_last_activity(user, post.commentable_id)

def handle_activity ( user , post , original_author_id = None ) : if ( ( original_author_id is not None ) and ( user . id != original_author_id ) ) : return if ( getattr ( post , 'context' , 'course' ) == TEAM_DISCUSSION_CONTEXT ) : CourseTeamMembership . update_last_activity ( user , post . commentable_id )
handle user activity from django_comment_client and discussion_api and update the users last activity date .