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
e8ac5860
Commit
e8ac5860
authored
Sep 04, 2012
by
Ibrahim Awwal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Oops, this was needed for replies to be rendered in the main forum view.
parent
32ccf51e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lms/djangoapps/django_comment_client/forum/views.py
+5
-5
No files found.
lms/djangoapps/django_comment_client/forum/views.py
View file @
e8ac5860
...
@@ -30,7 +30,7 @@ def _general_discussion_id(course_id):
...
@@ -30,7 +30,7 @@ def _general_discussion_id(course_id):
def
_should_perform_search
(
request
):
def
_should_perform_search
(
request
):
return
bool
(
request
.
GET
.
get
(
'text'
,
False
)
or
\
return
bool
(
request
.
GET
.
get
(
'text'
,
False
)
or
\
request
.
GET
.
get
(
'tags'
,
False
))
request
.
GET
.
get
(
'tags'
,
False
))
def
render_accordion
(
request
,
course
,
discussion_id
):
def
render_accordion
(
request
,
course
,
discussion_id
):
...
@@ -59,7 +59,7 @@ def render_discussion(request, course_id, threads, *args, **kwargs):
...
@@ -59,7 +59,7 @@ def render_discussion(request, course_id, threads, *args, **kwargs):
}[
discussion_type
]
}[
discussion_type
]
base_url
=
{
base_url
=
{
'inline'
:
(
lambda
:
reverse
(
'django_comment_client.forum.views.inline_discussion'
,
args
=
[
course_id
,
discussion_id
])),
'inline'
:
(
lambda
:
reverse
(
'django_comment_client.forum.views.inline_discussion'
,
args
=
[
course_id
,
discussion_id
])),
'forum'
:
(
lambda
:
reverse
(
'django_comment_client.forum.views.forum_form_discussion'
,
args
=
[
course_id
])),
'forum'
:
(
lambda
:
reverse
(
'django_comment_client.forum.views.forum_form_discussion'
,
args
=
[
course_id
])),
'user'
:
(
lambda
:
reverse
(
'django_comment_client.forum.views.user_profile'
,
args
=
[
course_id
,
user_id
])),
'user'
:
(
lambda
:
reverse
(
'django_comment_client.forum.views.user_profile'
,
args
=
[
course_id
,
user_id
])),
}[
discussion_type
]()
}[
discussion_type
]()
...
@@ -210,10 +210,10 @@ def single_thread(request, course_id, discussion_id, thread_id):
...
@@ -210,10 +210,10 @@ def single_thread(request, course_id, discussion_id, thread_id):
annotated_content_info
=
utils
.
get_annotated_content_infos
(
course_id
,
thread
,
request
.
user
,
user_info
=
user_info
)
annotated_content_info
=
utils
.
get_annotated_content_infos
(
course_id
,
thread
,
request
.
user
,
user_info
=
user_info
)
context
=
{
'thread'
:
thread
.
to_dict
(),
'course_id'
:
course_id
}
context
=
{
'thread'
:
thread
.
to_dict
(),
'course_id'
:
course_id
}
# TODO: Remove completely or switch back to server side rendering
# TODO: Remove completely or switch back to server side rendering
#
html = render_to_string('discussion/_ajax_single_thread.html', context)
html
=
render_to_string
(
'discussion/_ajax_single_thread.html'
,
context
)
return
utils
.
JsonResponse
({
return
utils
.
JsonResponse
({
#
'html': html,
'html'
:
html
,
'content'
:
utils
.
safe_content
(
thread
.
to_dict
()),
'content'
:
utils
.
safe_content
(
thread
.
to_dict
()),
'annotated_content_info'
:
annotated_content_info
,
'annotated_content_info'
:
annotated_content_info
,
})
})
...
@@ -276,7 +276,7 @@ def user_profile(request, course_id, user_id):
...
@@ -276,7 +276,7 @@ def user_profile(request, course_id, user_id):
})
})
else
:
else
:
context
=
{
context
=
{
'course'
:
course
,
'course'
:
course
,
'user'
:
request
.
user
,
'user'
:
request
.
user
,
'django_user'
:
User
.
objects
.
get
(
id
=
user_id
),
'django_user'
:
User
.
objects
.
get
(
id
=
user_id
),
'profiled_user'
:
profiled_user
.
to_dict
(),
'profiled_user'
:
profiled_user
.
to_dict
(),
...
...
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