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
8a953241
Commit
8a953241
authored
Mar 01, 2013
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first pass
parent
32e5f72c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
20 deletions
+18
-20
lms/djangoapps/django_comment_client/forum/views.py
+11
-10
lms/templates/discussion/_new_post.html
+7
-10
No files found.
lms/djangoapps/django_comment_client/forum/views.py
View file @
8a953241
...
...
@@ -147,17 +147,18 @@ def inline_discussion(request, course_id, discussion_id):
else
:
#otherwise, just make a dictionary of two
user_cohort
=
get_cohort
(
cc_user
,
course_id
)
if
user_cohort
:
user_cohort_name
=
user_cohort
.
name
user_cohort_id
=
user_cohort
.
id
else
:
user_cohort_name
=
user_cohort_id
=
None
#user_cohort = get_cohort(cc_user, course_id)
#if user_cohort:
# user_cohort_name = user_cohort.name
# user_cohort_id = user_cohort.id
#else:
# user_cohort_name = user_cohort_id = None
cohorts_list
=
None
if
user_cohort
:
cohorts_list
.
append
({
'name'
:
user_cohort_name
,
'id'
:
user_cohort_id
})
else
:
cohorts_list
=
None
#
if user_cohort:
#
cohorts_list.append({'name':user_cohort_name, 'id':user_cohort_id})
#
else:
#
cohorts_list = None
return
utils
.
JsonResponse
({
...
...
lms/templates/discussion/_new_post.html
View file @
8a953241
...
...
@@ -46,21 +46,18 @@
%elif course.metadata.get("allow_anonymous_to_peers", False):
<input
type=
"checkbox"
name=
"anonymous_to_peers"
class=
"discussion-anonymous-to-peers"
id=
"new-post-anonymous-to-peers"
><label
for=
"new-post-anonymous-to-peers"
>
post anonymously to classmates
</label>
%endif
%if is_course_cohorted:
%if is_course_cohorted
and is_moderator
:
<div
class=
"form-group-label choose-cohort"
>
Make visible to:
<select
class=
"group-filter-select new-post-group"
name =
"group_id"
>
<option
value=
""
>
All Groups
</option>
%if is_moderator:
%for c in cohorts:
<option
value=
"${c.id}"
>
${c.name}
</option>
%endfor
%else:
%if user_cohort:
<option
value=
"${user_cohort}"
>
My Cohort
</option>
%for c in cohorts:
<option
value=
"${c.id}"
%
if
user_cohort
and
user_cohort =
=
c
.
id
selected
%
endif
%endif
>
${c.name}
</option>
%endfor
</select>
</div>
%endif
...
...
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