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
6a816e45
Commit
6a816e45
authored
Jul 24, 2012
by
Rocky Duan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
watch/unwatch, vote status enabled in all views
parent
e6d437b6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
lms/djangoapps/django_comment_client/forum/views.py
+3
-1
lms/templates/discussion/index.html
+0
-4
lms/templates/discussion/inline.html
+5
-0
lms/templates/discussion/single_thread.html
+5
-0
No files found.
lms/djangoapps/django_comment_client/forum/views.py
View file @
6a816e45
...
...
@@ -95,6 +95,7 @@ def render_discussion(request, threads, discussion_id=None, search_text=''):
'threads'
:
threads
,
'discussion_id'
:
discussion_id
,
'search_bar'
:
render_search_bar
(
request
,
discussion_id
,
text
=
search_text
),
'user_info'
:
comment_client
.
get_user_info
(
request
.
user
.
id
,
raw
=
True
),
}
return
render_to_string
(
'discussion/inline.html'
,
context
)
...
...
@@ -139,6 +140,7 @@ def forum_form_discussion(request, course_id, discussion_id):
def
render_single_thread
(
request
,
thread_id
):
context
=
{
'thread'
:
comment_client
.
get_thread
(
thread_id
,
recursive
=
True
),
'user_info'
:
comment_client
.
get_user_info
(
request
.
user
.
id
,
raw
=
True
),
}
return
render_to_string
(
'discussion/single_thread.html'
,
context
)
...
...
@@ -149,7 +151,7 @@ def single_thread(request, thread_id):
'init'
:
''
,
'content'
:
render_single_thread
(
request
,
thread_id
),
'accordion'
:
''
,
'user_info'
:
json
.
dumps
(
comment_client
.
get_user_info
(
request
.
user
.
id
)
),
'user_info'
:
comment_client
.
get_user_info
(
request
.
user
.
id
,
raw
=
True
),
}
return
render_to_response
(
'discussion/index.html'
,
context
)
...
...
lms/templates/discussion/index.html
View file @
6a816e45
...
...
@@ -8,10 +8,6 @@
</
%
block>
<
%
block
name=
"js_extra"
>
<script
type=
"text/javascript"
>
var
user_info
=
JSON
.
parse
(
'${user_info}'
);
</script>
</
%
block>
##
<
%
include
file=
"../course_navigation.html"
args=
"active_page='discussion'"
/>
...
...
lms/templates/discussion/inline.html
View file @
6a816e45
...
...
@@ -14,3 +14,8 @@
${renderer.render_thread(thread, edit_thread=False, show_comments=False)}
% endfor
</section>
<script
type=
"text/javascript"
>
var
user_info
=
JSON
.
parse
(
'${user_info}'
);
</script>
lms/templates/discussion/single_thread.html
View file @
6a816e45
...
...
@@ -4,3 +4,8 @@
<a
class=
"discussion-title"
href=
"javascript:void(0)"
>
Discussion
</a>
${renderer.render_thread(thread, edit_thread=True, show_comments=True)}
</section>
<script
type=
"text/javascript"
>
var
user_info
=
JSON
.
parse
(
'${user_info}'
);
</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