Unnecessary logs.

This commit is contained in:
Awais Jibran
2020-03-12 15:15:22 +05:00
parent 6a25ca800b
commit 084b409662
2 changed files with 1 additions and 13 deletions

View File

@@ -306,10 +306,7 @@ class LibraryContentModule(LibraryContentFields, XModule, StudioEditableModule):
current user.
"""
for block_type, block_id in self.selected_children():
child = self.runtime.get_block(self.location.course_key.make_usage_key(block_type, block_id))
if child is None:
logger.info("Child not found for %s %s", str(block_type), str(block_id))
yield child
yield self.runtime.get_block(self.location.course_key.make_usage_key(block_type, block_id))
def student_view(self, context):
fragment = Fragment()

View File

@@ -370,16 +370,10 @@ def _find_thread(request, course, discussion_id, thread_id):
response_limit=request.GET.get("resp_limit")
)
except cc.utils.CommentClientRequestError:
log.info(u"Discussion Error: Thread ID:{thread_id} not found for Discussion: {discussion_id}".format(
thread_id=thread_id, discussion_id=discussion_id)
)
return None
# Verify that the student has access to this thread if belongs to a course discussion module
thread_context = getattr(thread, "context", "course")
if thread_context == "course" and not utils.discussion_category_id_access(course, request.user, discussion_id):
log.info(u'Discussion Error: Thread Context:{context} for thread: {thread}'.format(
context=thread_context, thread=thread.__dict__)
)
return None
# verify that the thread belongs to the requesting student's group
@@ -388,9 +382,6 @@ def _find_thread(request, course, discussion_id, thread_id):
if is_commentable_divided(course.id, discussion_id, course_discussion_settings) and not is_moderator:
user_group_id = get_group_id_for_user(request.user, course_discussion_settings)
if getattr(thread, "group_id", None) is not None and user_group_id != thread.group_id:
log.info(u"Discussion Error: user_group:{user_group} is not equal to thread_group:{thread_group}".format(
user_group=user_group_id, thread_group=thread.group_id
))
return None
return thread