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
f915befe
Commit
f915befe
authored
Aug 31, 2016
by
Douglas Hall
Committed by
GitHub
Aug 31, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13359 from edx/release
Merging rc/2016-08-31 into master
parents
49549282
27f263e4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
cms/djangoapps/contentstore/views/course.py
+5
-1
lms/djangoapps/courseware/tests/test_discussion_xblock.py
+3
-3
openedx/core/lib/xblock_builtin/xblock_discussion/xblock_discussion.py
+1
-1
No files found.
cms/djangoapps/contentstore/views/course.py
View file @
f915befe
...
@@ -990,7 +990,11 @@ def settings_handler(request, course_key_string):
...
@@ -990,7 +990,11 @@ def settings_handler(request, course_key_string):
about_page_editable
=
not
marketing_site_enabled
about_page_editable
=
not
marketing_site_enabled
enrollment_end_editable
=
GlobalStaff
()
.
has_user
(
request
.
user
)
or
not
marketing_site_enabled
enrollment_end_editable
=
GlobalStaff
()
.
has_user
(
request
.
user
)
or
not
marketing_site_enabled
short_description_editable
=
settings
.
FEATURES
.
get
(
'EDITABLE_SHORT_DESCRIPTION'
,
True
)
short_description_editable
=
configuration_helpers
.
get_value_for_org
(
course_module
.
location
.
org
,
'EDITABLE_SHORT_DESCRIPTION'
,
settings
.
FEATURES
.
get
(
'EDITABLE_SHORT_DESCRIPTION'
,
True
)
)
self_paced_enabled
=
SelfPacedConfiguration
.
current
()
.
enabled
self_paced_enabled
=
SelfPacedConfiguration
.
current
()
.
enabled
settings_context
=
{
settings_context
=
{
...
...
lms/djangoapps/courseware/tests/test_discussion_xblock.py
View file @
f915befe
...
@@ -176,13 +176,13 @@ class TestViews(TestDiscussionXBlock):
...
@@ -176,13 +176,13 @@ class TestViews(TestDiscussionXBlock):
permission_dict
=
{
permission_dict
=
{
'create_thread'
:
permissions
[
0
],
'create_thread'
:
permissions
[
0
],
'create_comment'
:
permissions
[
1
],
'create_comment'
:
permissions
[
1
],
'create_subcomment'
:
permissions
[
2
]
'create_sub
_
comment'
:
permissions
[
2
]
}
}
expected_permissions
=
{
expected_permissions
=
{
'can_create_thread'
:
permission_dict
[
'create_thread'
],
'can_create_thread'
:
permission_dict
[
'create_thread'
],
'can_create_comment'
:
permission_dict
[
'create_comment'
],
'can_create_comment'
:
permission_dict
[
'create_comment'
],
'can_create_subcomment'
:
permission_dict
[
'create_subcomment'
],
'can_create_subcomment'
:
permission_dict
[
'create_sub
_
comment'
],
}
}
self
.
block
.
has_permission
=
lambda
perm
:
permission_dict
[
perm
]
self
.
block
.
has_permission
=
lambda
perm
:
permission_dict
[
perm
]
...
@@ -236,7 +236,7 @@ class TestTemplates(TestDiscussionXBlock):
...
@@ -236,7 +236,7 @@ class TestTemplates(TestDiscussionXBlock):
permission_dict
=
{
permission_dict
=
{
'create_thread'
:
permissions
[
0
],
'create_thread'
:
permissions
[
0
],
'create_comment'
:
permissions
[
1
],
'create_comment'
:
permissions
[
1
],
'create_subcomment'
:
permissions
[
2
]
'create_sub
_
comment'
:
permissions
[
2
]
}
}
self
.
block
.
has_permission
=
lambda
perm
:
permission_dict
[
perm
]
self
.
block
.
has_permission
=
lambda
perm
:
permission_dict
[
perm
]
...
...
openedx/core/lib/xblock_builtin/xblock_discussion/xblock_discussion.py
View file @
f915befe
...
@@ -117,7 +117,7 @@ class DiscussionXBlock(XBlock, StudioEditableXBlockMixin, XmlParserMixin):
...
@@ -117,7 +117,7 @@ class DiscussionXBlock(XBlock, StudioEditableXBlockMixin, XmlParserMixin):
'course_id'
:
self
.
course_key
,
'course_id'
:
self
.
course_key
,
'can_create_thread'
:
self
.
has_permission
(
"create_thread"
),
'can_create_thread'
:
self
.
has_permission
(
"create_thread"
),
'can_create_comment'
:
self
.
has_permission
(
"create_comment"
),
'can_create_comment'
:
self
.
has_permission
(
"create_comment"
),
'can_create_subcomment'
:
self
.
has_permission
(
"create_subcomment"
),
'can_create_subcomment'
:
self
.
has_permission
(
"create_sub
_
comment"
),
}
}
fragment
.
add_content
(
self
.
runtime
.
render_template
(
'discussion/_discussion_inline.html'
,
context
))
fragment
.
add_content
(
self
.
runtime
.
render_template
(
'discussion/_discussion_inline.html'
,
context
))
...
...
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