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
f7ba14ae
Commit
f7ba14ae
authored
Feb 04, 2013
by
Kevin Chugh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move group logic to get_threads
parent
3009acbb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletions
+7
-1
lms/djangoapps/django_comment_client/base/views.py
+1
-1
lms/djangoapps/django_comment_client/forum/views.py
+6
-0
No files found.
lms/djangoapps/django_comment_client/base/views.py
View file @
f7ba14ae
...
...
@@ -107,7 +107,7 @@ def create_thread(request, course_id, commentable_id):
# else:
# regular users always post with their own id.
# group_id = user_group_id
if
post
[
'group_id'
]
:
if
'group_id'
in
post
.
keys
()
:
thread
.
update_attributes
(
group_id
=
post
[
'group_id'
])
thread
.
save
()
...
...
lms/djangoapps/django_comment_client/forum/views.py
View file @
f7ba14ae
...
...
@@ -72,6 +72,12 @@ def get_threads(request, course_id, discussion_id=None, per_page=THREADS_PER_PAG
'tags'
,
'commentable_ids'
])))
threads
,
page
,
num_pages
=
cc
.
Thread
.
search
(
query_params
)
#now add the group name if the thread has a group id
for
thread
in
threads
:
if
thread
.
get
(
'group_id'
)
and
not
thread
.
get
(
'group_name'
):
thread
[
'group_name'
]
=
get_cohort_by_id
(
course_id
,
thread
.
get
(
'group_id'
))
.
name
query_params
[
'page'
]
=
page
query_params
[
'num_pages'
]
=
num_pages
...
...
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