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
e0bc8233
Commit
e0bc8233
authored
Apr 11, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove auto-provisioning because of a dependency problem between cms and lms
parent
5e3ca48c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
33 deletions
+24
-33
cms/djangoapps/contentstore/views.py
+0
-4
common/djangoapps/util/forum_util.py
+0
-27
lms/djangoapps/django_comment_client/management/commands/seed_permissions_roles.py
+24
-2
No files found.
cms/djangoapps/contentstore/views.py
View file @
e0bc8233
...
...
@@ -13,7 +13,6 @@ from xmodule.modulestore.xml_exporter import export_to_xml
from
tempfile
import
mkdtemp
from
django.core.servers.basehttp
import
FileWrapper
from
django.core.files.temp
import
NamedTemporaryFile
from
util.forum_util
import
seed_permissions_roles
# to install PIL on MacOSX: 'easy_install http://dist.repoze.org/PIL-1.1.6.tar.gz'
from
PIL
import
Image
...
...
@@ -1515,9 +1514,6 @@ def create_new_course(request):
create_all_course_groups
(
request
.
user
,
new_course
.
location
)
# provision the forum
seed_permissions_roles
(
new_course
.
location
.
course_id
)
return
HttpResponse
(
json
.
dumps
({
'id'
:
new_course
.
location
.
url
()}))
...
...
common/djangoapps/util/forum_util.py
deleted
100644 → 0
View file @
5e3ca48c
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
]
moderator_role
=
Role
.
objects
.
get_or_create
(
name
=
"Moderator"
,
course_id
=
course_id
)[
0
]
community_ta_role
=
Role
.
objects
.
get_or_create
(
name
=
"Community TA"
,
course_id
=
course_id
)[
0
]
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"
,
]:
student_role
.
add_permission
(
per
)
for
per
in
[
"edit_content"
,
"delete_thread"
,
"openclose_thread"
,
"endorse_comment"
,
"delete_comment"
,
"see_all_cohorts"
]:
moderator_role
.
add_permission
(
per
)
for
per
in
[
"manage_moderator"
]:
administrator_role
.
add_permission
(
per
)
moderator_role
.
inherit_permissions
(
student_role
)
# For now, Community TA == Moderator, except for the styling.
community_ta_role
.
inherit_permissions
(
moderator_role
)
administrator_role
.
inherit_permissions
(
moderator_role
)
lms/djangoapps/django_comment_client/management/commands/seed_permissions_roles.py
View file @
e0bc8233
from
django.core.management.base
import
BaseCommand
,
CommandError
from
util.forum_util
import
seed_permissions_roles
from
django_comment_client.models
import
Role
class
Command
(
BaseCommand
):
...
...
@@ -13,4 +13,26 @@ class Command(BaseCommand):
raise
CommandError
(
"Too many arguments"
)
course_id
=
args
[
0
]
seed_permissions_roles
(
course_id
)
administrator_role
=
Role
.
objects
.
get_or_create
(
name
=
"Administrator"
,
course_id
=
course_id
)[
0
]
moderator_role
=
Role
.
objects
.
get_or_create
(
name
=
"Moderator"
,
course_id
=
course_id
)[
0
]
community_ta_role
=
Role
.
objects
.
get_or_create
(
name
=
"Community TA"
,
course_id
=
course_id
)[
0
]
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"
,
]:
student_role
.
add_permission
(
per
)
for
per
in
[
"edit_content"
,
"delete_thread"
,
"openclose_thread"
,
"endorse_comment"
,
"delete_comment"
,
"see_all_cohorts"
]:
moderator_role
.
add_permission
(
per
)
for
per
in
[
"manage_moderator"
]:
administrator_role
.
add_permission
(
per
)
moderator_role
.
inherit_permissions
(
student_role
)
# For now, Community TA == Moderator, except for the styling.
community_ta_role
.
inherit_permissions
(
moderator_role
)
administrator_role
.
inherit_permissions
(
moderator_role
)
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