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
5e3ca48c
Commit
5e3ca48c
authored
Apr 10, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address some violations
parent
07b9d635
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
common/djangoapps/util/forum_util.py
+6
-6
common/lib/xmodule/xmodule/raw_module.py
+3
-3
No files found.
common/djangoapps/util/forum_util.py
View file @
5e3ca48c
from
django_comment_client.models
import
Permission
,
Role
from
django_comment_client.models
import
Role
def
seed_permissions_roles
(
course_id
):
administrator_role
=
Role
.
objects
.
get_or_create
(
name
=
"Administrator"
,
course_id
=
course_id
)[
0
]
...
...
@@ -7,12 +8,12 @@ def seed_permissions_roles(course_id):
student_role
=
Role
.
objects
.
get_or_create
(
name
=
"Student"
,
course_id
=
course_id
)[
0
]
for
per
in
[
"vote"
,
"update_thread"
,
"follow_thread"
,
"unfollow_thread"
,
"update_comment"
,
"create_sub_comment"
,
"unvote"
,
"create_thread"
,
"follow_commentable"
,
"unfollow_commentable"
,
"create_comment"
,
]:
"update_comment"
,
"create_sub_comment"
,
"unvote"
,
"create_thread"
,
"follow_commentable"
,
"unfollow_commentable"
,
"create_comment"
,
]:
student_role
.
add_permission
(
per
)
for
per
in
[
"edit_content"
,
"delete_thread"
,
"openclose_thread"
,
"endorse_comment"
,
"delete_comment"
,
"see_all_cohorts"
]:
"endorse_comment"
,
"delete_comment"
,
"see_all_cohorts"
]:
moderator_role
.
add_permission
(
per
)
for
per
in
[
"manage_moderator"
]:
...
...
@@ -23,4 +24,4 @@ def seed_permissions_roles(course_id):
# For now, Community TA == Moderator, except for the styling.
community_ta_role
.
inherit_permissions
(
moderator_role
)
administrator_role
.
inherit_permissions
(
moderator_role
)
\ No newline at end of file
administrator_role
.
inherit_permissions
(
moderator_role
)
common/lib/xmodule/xmodule/raw_module.py
View file @
5e3ca48c
from
lxml
import
etree
from
xmodule.editing_module
import
XMLEditingDescriptor
,
MetadataOnlyEditingDescriptor
from
xmodule.editing_module
import
XMLEditingDescriptor
from
xmodule.xml_module
import
XmlDescriptor
import
logging
import
sys
...
...
@@ -29,6 +29,6 @@ class RawDescriptor(XmlDescriptor, XMLEditingDescriptor):
line
,
offset
=
err
.
position
msg
=
(
"Unable to create xml for problem {loc}. "
"Context: '{context}'"
.
format
(
context
=
lines
[
line
-
1
][
offset
-
40
:
offset
+
40
],
loc
=
self
.
location
))
context
=
lines
[
line
-
1
][
offset
-
40
:
offset
+
40
],
loc
=
self
.
location
))
raise
Exception
,
msg
,
sys
.
exc_info
()[
2
]
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