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
5bfd2c33
Commit
5bfd2c33
authored
Jan 29, 2013
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
send cohort to post view context
parent
43d4661c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
lms/djangoapps/django_comment_client/forum/views.py
+2
-1
lms/templates/discussion/_new_post.html
+5
-3
No files found.
lms/djangoapps/django_comment_client/forum/views.py
View file @
5bfd2c33
...
...
@@ -11,7 +11,7 @@ from django.contrib.auth.models import User
from
mitxmako.shortcuts
import
render_to_response
,
render_to_string
from
courseware.courses
import
get_course_with_access
from
course_groups.cohorts
import
get_cohort_id
from
course_groups.cohorts
import
get_cohort_id
,
get_course_cohorts
from
courseware.access
import
has_access
from
urllib
import
urlencode
...
...
@@ -166,6 +166,7 @@ def forum_form_discussion(request, course_id):
'category_map'
:
category_map
,
'roles'
:
saxutils
.
escape
(
json
.
dumps
(
utils
.
get_role_ids
(
course_id
)),
escapedict
),
'is_moderator'
:
cached_has_permission
(
request
.
user
,
"see_all_cohorts"
,
course_id
),
'cohorts'
:
get_course_cohorts
}
# print "start rendering.."
return
render_to_response
(
'discussion/index.html'
,
context
)
...
...
lms/templates/discussion/_new_post.html
View file @
5bfd2c33
...
...
@@ -45,13 +45,15 @@
%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
true
:
% if
is_moderator
:
<div
class=
"form-group-label"
>
Make visible to:
<select
class=
"group-filter-select"
>
<option
value=
"all"
>
All Groups
</option>
<option
>
All Groups
</option>
%for c in cohorts:
<option
value=
"g1"
>
Group 1
</option>
<option
value=
"g2"
>
Group 2
</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