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
90d3dc37
Commit
90d3dc37
authored
Aug 14, 2012
by
Rocky Duan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug caused by missing course_id in retrieved comments
parent
fcd2a2c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
lms/djangoapps/django_comment_client/forum/views.py
+4
-3
lms/templates/discussion/_thread.html
+1
-0
No files found.
lms/djangoapps/django_comment_client/forum/views.py
View file @
90d3dc37
...
...
@@ -4,6 +4,7 @@ from django.http import HttpResponse
from
django.utils
import
simplejson
from
django.core.context_processors
import
csrf
from
django.core.urlresolvers
import
reverse
from
django.contrib.auth.models
import
User
from
mitxmako.shortcuts
import
render_to_response
,
render_to_string
from
courseware.courses
import
check_course
...
...
@@ -167,7 +168,7 @@ def single_thread(request, course_id, discussion_id, thread_id):
thread
=
cc
.
Thread
.
find
(
thread_id
)
.
retrieve
(
recursive
=
True
)
annotated_content_info
=
utils
.
get_annotated_content_infos
(
course_id
,
thread
,
request
.
user
,
type
=
'thread'
)
context
=
{
'thread'
:
thread
.
to_dict
()}
context
=
{
'thread'
:
thread
.
to_dict
()
,
'course_id'
:
course_id
}
html
=
render_to_string
(
'discussion/_ajax_single_thread.html'
,
context
)
return
utils
.
JsonResponse
({
...
...
@@ -185,6 +186,7 @@ def single_thread(request, course_id, discussion_id, thread_id):
'content'
:
render_single_thread
(
request
,
discussion_id
,
course_id
,
thread_id
),
'accordion'
:
render_accordion
(
request
,
course
,
discussion_id
),
'course'
:
course
,
'course_id'
:
course
.
id
,
}
return
render_to_response
(
'discussion/index.html'
,
context
)
...
...
@@ -198,9 +200,8 @@ def user_profile(request, course_id, user_id):
context
=
{
'course'
:
course
,
'user'
:
request
.
user
,
'django_user'
:
User
.
objects
.
get
(
id
=
user_id
),
'discussion_user'
:
discussion_user
.
to_dict
(),
}
print
context
return
render_to_response
(
'discussion/user_profile.html'
,
context
)
lms/templates/discussion/_thread.html
View file @
90d3dc37
...
...
@@ -115,6 +115,7 @@
<
%
def
name=
"render_info(content)"
>
<
%
def
url_for_user
(
user_id
)
:
import
pdb
;
pdb
.
set_trace
()
return
reverse
('
django_comment_client
.
forum
.
views
.
user_profile
',
args=
[course_id,
user_id
])
%
>
<div
class=
"comment-time"
>
...
...
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