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
f6ed874a
Commit
f6ed874a
authored
Aug 14, 2012
by
Rocky Duan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed permalink
parent
ba7a0b68
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
13 deletions
+10
-13
lms/djangoapps/django_comment_client/forum/views.py
+1
-1
lms/templates/discussion/_forum.html
+4
-3
lms/templates/discussion/_single_thread.html
+5
-9
No files found.
lms/djangoapps/django_comment_client/forum/views.py
View file @
f6ed874a
...
@@ -155,7 +155,7 @@ def render_single_thread(request, discussion_id, course_id, thread_id):
...
@@ -155,7 +155,7 @@ def render_single_thread(request, discussion_id, course_id, thread_id):
context
=
{
context
=
{
'discussion_id'
:
discussion_id
,
'discussion_id'
:
discussion_id
,
'thread'
:
thread
,
'thread'
:
thread
,
'user_info'
:
cc
.
User
.
from_django_user
(
request
.
user
)
.
to_dict
(
),
'user_info'
:
json
.
dumps
(
cc
.
User
.
from_django_user
(
request
.
user
)
.
to_dict
()
),
'annotated_content_info'
:
json
.
dumps
(
annotated_content_info
),
'annotated_content_info'
:
json
.
dumps
(
annotated_content_info
),
'course_id'
:
course_id
,
'course_id'
:
course_id
,
'request'
:
request
,
'request'
:
request
,
...
...
lms/templates/discussion/_forum.html
View file @
f6ed874a
<
%
namespace
name=
"renderer"
file=
"_thread.html"
/>
<
%
namespace
name=
"renderer"
file=
"_thread.html"
/>
<
%!
from
django
.
template
.
defaultfilters
import
escapejs
%
>
<section
class=
"discussion forum-discussion"
_id=
"${discussion_id}"
>
<section
class=
"discussion forum-discussion"
_id=
"${discussion_id}"
>
...
@@ -29,10 +30,10 @@
...
@@ -29,10 +30,10 @@
%
>
%
>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
$$user_info
=
JSON
.
parse
(
'${user_info | escape_quotes}'
);
var
$$user_info
=
JSON
.
parse
(
"${user_info | escapejs}"
);
var
$$course_id
=
"${course_id}"
;
var
$$course_id
=
"${course_id
| escapejs
}"
;
if
(
typeof
$$annotated_content_info
===
undefined
||
$$annotated_content_info
===
null
)
{
if
(
typeof
$$annotated_content_info
===
undefined
||
$$annotated_content_info
===
null
)
{
var
$$annotated_content_info
=
{};
var
$$annotated_content_info
=
{};
}
}
$$annotated_content_info
=
$
.
extend
(
$$annotated_content_info
,
JSON
.
parse
(
"${annotated_content_info | escape
_quote
s}"
));
$$annotated_content_info
=
$
.
extend
(
$$annotated_content_info
,
JSON
.
parse
(
"${annotated_content_info | escape
j
s}"
));
</script>
</script>
lms/templates/discussion/_single_thread.html
View file @
f6ed874a
<
%
namespace
name=
"renderer"
file=
"_thread.html"
/>
<
%
namespace
name=
"renderer"
file=
"_thread.html"
/>
<
%!
from
django
.
template
.
defaultfilters
import
escapejs
%
>
<section
class=
"discussion"
>
<section
class=
"discussion"
_id=
"${discussion_id}"
>
<a
class=
"discussion-title"
href=
"javascript:void(0)"
>
Discussion
</a>
<a
class=
"discussion-title"
href=
"javascript:void(0)"
>
Discussion
</a>
${renderer.render_thread(course_id, thread, show_comments=True)}
${renderer.render_thread(course_id, thread, show_comments=True)}
</section>
</section>
<
%!
def
escape_quotes
(
text
)
:
return
text
.
replace
('\"',
'\\\"').
replace
("\'",
"\\\'")
%
>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
$$user_info
=
JSON
.
parse
(
'${user_info | escape_quotes}'
);
var
$$user_info
=
JSON
.
parse
(
"${user_info | escapejs}"
);
var
$$course_id
=
"${course_id}"
;
var
$$course_id
=
"${course_id
| escapejs
}"
;
if
(
typeof
$$annotated_content_info
===
undefined
||
$$annotated_content_info
===
null
)
{
if
(
typeof
$$annotated_content_info
===
undefined
||
$$annotated_content_info
===
null
)
{
var
$$annotated_content_info
=
{};
var
$$annotated_content_info
=
{};
}
}
$$annotated_content_info
=
$
.
extend
(
$$annotated_content_info
,
JSON
.
parse
(
"${annotated_content_info | escape
_quote
s}"
));
$$annotated_content_info
=
$
.
extend
(
$$annotated_content_info
,
JSON
.
parse
(
"${annotated_content_info | escape
j
s}"
));
</script>
</script>
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