Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
07534a72
Commit
07534a72
authored
Mar 13, 2013
by
Kevin Chugh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix thread/thread id issue
parent
8280c559
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
lms/djangoapps/django_comment_client/base/views.py
+2
-2
lms/lib/comment_client/thread.py
+2
-0
No files found.
lms/djangoapps/django_comment_client/base/views.py
View file @
07534a72
...
...
@@ -295,13 +295,13 @@ def undo_vote_for_thread(request, course_id, thread_id):
def
pin_thread
(
request
,
course_id
,
thread_id
):
user
=
cc
.
User
.
from_django_user
(
request
.
user
)
thread
=
cc
.
Thread
.
find
(
thread_id
)
thread
.
pin
(
user
,
thread
)
thread
.
pin
(
user
,
thread
_id
)
return
JsonResponse
(
utils
.
safe_content
(
thread
.
to_dict
()))
def
un_pin_thread
(
request
,
course_id
,
thread_id
):
user
=
cc
.
User
.
from_django_user
(
request
.
user
)
thread
=
cc
.
Thread
.
find
(
thread_id
)
thread
.
un_pin
(
user
,
thread
)
thread
.
un_pin
(
user
,
thread
_id
)
return
JsonResponse
(
utils
.
safe_content
(
thread
.
to_dict
()))
...
...
lms/lib/comment_client/thread.py
View file @
07534a72
...
...
@@ -84,6 +84,8 @@ class Thread(models.Model):
url
=
_url_for_pin_thread
(
thread_id
)
params
=
{
'user_id'
:
user
.
id
}
request
=
perform_request
(
'put'
,
url
,
params
)
print
"
\n\n\n\n\n\n
*******************"
print
request
self
.
update_attributes
(
request
)
def
un_pin
(
self
,
user
,
thread_id
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment