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
a2f0e31d
Commit
a2f0e31d
authored
Aug 07, 2012
by
Brittany Cheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:dementrock/mitx into brittany
parents
9ae21a87
fddee7de
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
8 deletions
+21
-8
lms/djangoapps/django_comment_client/forum/views.py
+8
-0
lms/lib/comment_client.py
+8
-0
lms/templates/discussion/_recent_active_posts.html
+4
-8
lms/templates/discussion/index.html
+1
-0
No files found.
lms/djangoapps/django_comment_client/forum/views.py
View file @
a2f0e31d
...
...
@@ -121,6 +121,13 @@ def forum_form_discussion(request, course_id, discussion_id):
content
=
render_forum_discussion
(
request
,
course_id
,
threads
,
discussion_id
=
discussion_id
,
\
query_params
=
query_params
)
recent_active_threads
=
comment_client
.
search_recent_active_threads
(
course_id
,
recursive
=
False
,
query_params
=
{
'follower_id'
:
request
.
user
.
id
,
'commentable_id'
:
discussion_id
},
)
if
request
.
is_ajax
():
return
utils
.
HtmlResponse
(
content
)
else
:
...
...
@@ -129,6 +136,7 @@ def forum_form_discussion(request, course_id, discussion_id):
'course'
:
course
,
'content'
:
content
,
'accordion'
:
render_accordion
(
request
,
course
,
discussion_id
),
'recent_active_threads'
:
recent_active_threads
,
}
return
render_to_response
(
'discussion/index.html'
,
context
)
...
...
lms/lib/comment_client.py
View file @
a2f0e31d
...
...
@@ -34,6 +34,11 @@ def search_similar_threads(course_id, recursive=False, query_params={}, *args, *
attributes
=
dict
(
default_params
.
items
()
+
query_params
.
items
())
return
_perform_request
(
'get'
,
_url_for_search_similar_threads
(),
attributes
,
*
args
,
**
kwargs
)
def
search_recent_active_threads
(
course_id
,
recursive
=
False
,
query_params
=
{},
*
args
,
**
kwargs
):
default_params
=
{
'course_id'
:
course_id
,
'recursive'
:
recursive
}
attributes
=
dict
(
default_params
.
items
()
+
query_params
.
items
())
return
_perform_request
(
'get'
,
_url_for_search_recent_active_threads
(),
attributes
,
*
args
,
**
kwargs
)
def
create_user
(
attributes
,
*
args
,
**
kwargs
):
return
_perform_request
(
'post'
,
_url_for_users
(),
attributes
,
*
args
,
**
kwargs
)
...
...
@@ -167,6 +172,9 @@ def _url_for_search_threads():
def
_url_for_search_similar_threads
():
return
"{prefix}/search/threads/more_like_this"
.
format
(
prefix
=
PREFIX
)
def
_url_for_search_recent_active_threads
():
return
"{prefix}/search/threads/recent_active"
.
format
(
prefix
=
PREFIX
)
def
_url_for_threads_tags
():
return
"{prefix}/threads/tags"
.
format
(
prefix
=
PREFIX
)
...
...
lms/templates/discussion/_recent_active_posts.html
View file @
a2f0e31d
...
...
@@ -2,12 +2,8 @@
<div
class=
"recent-activity-title"
>
Recent Activity:
</div>
<div
class=
"recent-active-posts"
>
<a
class=
"recent-active-post"
href=
"javascript:void(0)"
>
Sapiente officiis debitis repellendus eligendi aliquid natus saepe.
</a>
<a
class=
"recent-active-post"
href=
"javascript:void(0)"
>
Sapiente officiis debitis repellendus eligendi aliquid natus saepe.
</a>
<a
class=
"recent-active-post"
href=
"javascript:void(0)"
>
Sapiente officiis debitis repellendus eligendi aliquid natus saepe.
</a>
<a
class=
"recent-active-post"
href=
"javascript:void(0)"
>
Sapiente officiis debitis repellendus eligendi aliquid natus saepe.
</a>
<a
class=
"recent-active-post"
href=
"javascript:void(0)"
>
Sapiente officiis debitis repellendus eligendi aliquid natus saepe.
</a>
<a
class=
"recent-active-post"
href=
"javascript:void(0)"
>
Sapiente officiis debitis repellendus eligendi aliquid natus saepe.
</a>
</div>
<div
class=
"recent-active-posts"
>
% for thread in recent_active_threads:
<a
class=
"recent-active-post"
href=
"javascript:void(0)"
>
${thread['title']}
</a>
% endfor
</div>
lms/templates/discussion/index.html
View file @
a2f0e31d
...
...
@@ -27,6 +27,7 @@
</nav>
</div>
<
%
include
file=
"_recent_active_posts.html"
/>
<
%
include
file=
"_trending_tags.html"
/>
</section>
<section
class=
"course-content"
>
...
...
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