Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, April 9th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
ca0800a4
Commit
ca0800a4
authored
5 years ago
by
DawoudSheraz
Browse files
Options
Downloads
Patches
Plain Diff
added logs for more information
parent
94580456
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/djangoapps/discussion/views.py
+9
-0
9 additions, 0 deletions
lms/djangoapps/discussion/views.py
with
9 additions
and
0 deletions
lms/djangoapps/discussion/views.py
+
9
−
0
View file @
ca0800a4
...
...
@@ -353,10 +353,16 @@ 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
...
...
@@ -365,6 +371,9 @@ 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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment