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
OpenEdx
edx-platform
Commits
ca75d4ee
Commit
ca75d4ee
authored
Sep 27, 2017
by
Michael LoTurco
Committed by
Troy Sankey
Sep 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
started development for seed_rocket_chat
parent
33e59e66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
cms/djangoapps/contentstore/views/course.py
+19
-0
No files found.
cms/djangoapps/contentstore/views/course.py
View file @
ca75d4ee
...
...
@@ -1296,6 +1296,8 @@ def advanced_settings_handler(request, course_key_string):
# now update mongo
modulestore
()
.
update_item
(
course_module
,
request
.
user
.
id
)
seed_rocket_chat
(
course_key_string
)
return
JsonResponse
(
updated_data
)
else
:
return
JsonResponseBadRequest
(
errors
)
...
...
@@ -1307,6 +1309,23 @@ def advanced_settings_handler(request, course_key_string):
content_type
=
"text/plain"
)
def
seed_rocket_chat
(
course_key
):
master_username
=
'apiuser'
master_password
=
'apipassword'
rocket_url
=
'https://hackachattest-chat.sandbox.edx.org'
rocketWrap
=
RocketWrap
(
master_username
,
master_password
,
server_url
=
rocket_url
,
ssl_verify
=
False
)
newgroup
=
rocketWrap
.
create_new_group
(
course_key
)
# course_staff = [] # get_course_staff(course_key) #not a real call, this is pseudo
# for user in course_staff:
# rocketWrap.create_user(user.email, user.name, user.password, user.username)
# rocket.add_staff_users_to_group_as_admin(course_staff) #TODO: right this function
description
=
"test"
# get_short_description(course_key) #not a real call this is pseudo
rocket
.
set_topic
(
newgroup
.
name
,
description
)
class
TextbookValidationError
(
Exception
):
"An error thrown when a textbook input is invalid"
...
...
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