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
252a21eb
Commit
252a21eb
authored
Sep 27, 2012
by
Ibrahim Awwal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unbork single_thread.
parent
90aa7dc5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
lms/djangoapps/django_comment_client/forum/views.py
+4
-10
lms/templates/discussion/single_thread.html
+2
-1
No files found.
lms/djangoapps/django_comment_client/forum/views.py
View file @
252a21eb
...
@@ -191,21 +191,15 @@ def single_thread(request, course_id, discussion_id, thread_id):
...
@@ -191,21 +191,15 @@ def single_thread(request, course_id, discussion_id, thread_id):
for
thread
in
threads
:
for
thread
in
threads
:
add_courseware_context
(
thread
,
course
)
add_courseware_context
(
thread
,
course
)
context
=
threads_context
(
request
.
user
,
threads
,
course_id
,
query_params
[
'page'
]
.
query_params
[
'num_pages'
])
context
=
threads_context
(
request
.
user
,
threads
,
course_id
,
query_params
[
'page'
]
,
query_params
[
'num_pages'
])
context
[
'discussion_id'
]
=
discussion_id
context
[
'discussion_id'
]
=
discussion_id
# TODO: Escape in template
# TODO: Escape in template
(user_info, annconinfo, threads, roles)
context
=
{
context
.
update
(
{
'discussion_id'
:
discussion_id
,
'discussion_id'
:
discussion_id
,
'user_info'
:
escape_quote
(
json
.
dumps
(
user_info
)),
'annotated_content_info'
:
saxutils
.
escape
(
json
.
dumps
(
annotated_content_info
),
escapedict
),
'course'
:
course
,
'course'
:
course
,
'course_id'
:
course
.
id
,
#TODO: Why pass both course and course.id to template?
'thread_id'
:
thread_id
,
'thread_id'
:
thread_id
,
'threads'
:
saxutils
.
escape
(
json
.
dumps
(
threads
),
escapedict
),
'category_map'
:
category_map
,
'category_map'
:
category_map
,
'roles'
:
saxutils
.
escape
(
json
.
dumps
(
utils
.
get_role_ids
(
course_id
)),
escapedict
),
})
'thread_pages'
:
query_params
[
'num_pages'
],
}
return
render_to_response
(
'discussion/single_thread.html'
,
context
)
return
render_to_response
(
'discussion/single_thread.html'
,
context
)
...
...
lms/templates/discussion/single_thread.html
View file @
252a21eb
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<
%!
from
django
.
template
.
defaultfilters
import
escapejs
%
>
<
%!
from
django
.
template
.
defaultfilters
import
escapejs
%
>
<
%!
from
django
.
core
.
urlresolvers
import
reverse
%
>
<
%!
from
django
.
core
.
urlresolvers
import
reverse
%
>
<
%!
from
courseware
.
access
import
has_access
%
>
<
%!
from
courseware
.
access
import
has_access
%
>
<
%!
import
json
%
>
<
%
inherit
file=
"../main.html"
/>
<
%
inherit
file=
"../main.html"
/>
<
%
namespace
name=
'static'
file=
'../static_content.html'
/>
<
%
namespace
name=
'static'
file=
'../static_content.html'
/>
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<
%
include
file=
"_new_post.html"
/>
<
%
include
file=
"_new_post.html"
/>
<section
class=
"discussion container"
id=
"discussion-container"
data-roles=
"${
roles}"
data-course-id=
"${course_id}"
data-user-info=
"${user_info}"
data-threads=
"${threads}"
data-content-info=
"${annotated_content_info}"
data-thread-pages=
"${thread
_pages}"
>
<section
class=
"discussion container"
id=
"discussion-container"
data-roles=
"${
json.dumps(roles) | entity}"
data-course-id=
"${course.id}"
data-user-info=
"${json.dumps(user_info) | entity}"
data-threads=
"${json.dumps(threads) | entity}"
data-content-info=
"${json.dumps(annotated_content_info)|entity}"
data-thread-pages=
"${num
_pages}"
>
<div
class=
"discussion-body"
>
<div
class=
"discussion-body"
>
<div
class=
"sidebar"
></div>
<div
class=
"sidebar"
></div>
<div
class=
"discussion-column"
></div>
<div
class=
"discussion-column"
></div>
...
...
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