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
68baafb8
Commit
68baafb8
authored
Sep 04, 2012
by
Ibrahim Awwal
Committed by
Matthew Mongeau
Sep 10, 2012
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
b64236f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
51 deletions
+0
-51
lms/djangoapps/django_comment_client/forum/views.py
+0
-51
No files found.
lms/djangoapps/django_comment_client/forum/views.py
View file @
68baafb8
...
@@ -236,7 +236,6 @@ def render_single_thread(request, discussion_id, course_id, thread_id):
...
@@ -236,7 +236,6 @@ def render_single_thread(request, discussion_id, course_id, thread_id):
def
single_thread
(
request
,
course_id
,
discussion_id
,
thread_id
):
def
single_thread
(
request
,
course_id
,
discussion_id
,
thread_id
):
<<<<<<<
HEAD
try
:
try
:
if
request
.
is_ajax
():
if
request
.
is_ajax
():
...
@@ -287,56 +286,6 @@ def single_thread(request, course_id, discussion_id, thread_id):
...
@@ -287,56 +286,6 @@ def single_thread(request, course_id, discussion_id, thread_id):
return
render_to_response
(
'discussion/single_thread.html'
,
context
)
return
render_to_response
(
'discussion/single_thread.html'
,
context
)
except
(
cc
.
utils
.
CommentClientError
,
cc
.
utils
.
CommentClientUnknownError
)
as
err
:
except
(
cc
.
utils
.
CommentClientError
,
cc
.
utils
.
CommentClientUnknownError
)
as
err
:
raise
Http404
raise
Http404
=======
if
request
.
is_ajax
():
user_info
=
cc
.
User
.
from_django_user
(
request
.
user
)
.
to_dict
()
thread
=
cc
.
Thread
.
find
(
thread_id
)
.
retrieve
(
recursive
=
True
)
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
}
# TODO: Remove completely or switch back to server side rendering
# html = render_to_string('discussion/_ajax_single_thread.html', context)
return
utils
.
JsonResponse
({
# 'html': html,
'content'
:
utils
.
safe_content
(
thread
.
to_dict
()),
'annotated_content_info'
:
annotated_content_info
,
})
else
:
course
=
get_course_with_access
(
request
.
user
,
course_id
,
'load'
)
category_map
=
utils
.
get_discussion_category_map
(
course
)
threads
,
query_params
=
get_threads
(
request
,
course_id
)
recent_active_threads
=
cc
.
search_recent_active_threads
(
course_id
,
recursive
=
False
,
query_params
=
{
'follower_id'
:
request
.
user
.
id
},
)
trending_tags
=
cc
.
search_trending_tags
(
course_id
,
)
user_info
=
cc
.
User
.
from_django_user
(
request
.
user
)
.
to_dict
()
escapedict
=
{
'"'
:
'"'
}
context
=
{
'discussion_id'
:
discussion_id
,
'csrf'
:
csrf
(
request
)[
'csrf_token'
],
'init'
:
''
,
'user_info'
:
saxutils
.
escape
(
json
.
dumps
(
user_info
),
escapedict
),
'content'
:
render_single_thread
(
request
,
discussion_id
,
course_id
,
thread_id
),
'course'
:
course
,
'recent_active_threads'
:
recent_active_threads
,
'trending_tags'
:
trending_tags
,
'course_id'
:
course
.
id
,
'thread_id'
:
thread_id
,
'threads'
:
saxutils
.
escape
(
json
.
dumps
(
threads
),
escapedict
),
'category_map'
:
category_map
,
}
return
render_to_response
(
'discussion/single_thread.html'
,
context
)
>>>>>>>
Refactor
some
things
more
and
make
the
forum
index
sort
of
work
,
although
the
sticky
sidebar
is
broken
,
probably
because
there
's no content in the thread view pane.
def
user_profile
(
request
,
course_id
,
user_id
):
def
user_profile
(
request
,
course_id
,
user_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