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
1e8acbef
Commit
1e8acbef
authored
Jun 29, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a temporary url for testing xml export triggering
parent
f375258b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
cms/djangoapps/contentstore/views.py
+14
-0
cms/urls.py
+1
-0
No files found.
cms/djangoapps/contentstore/views.py
View file @
1e8acbef
...
...
@@ -4,6 +4,7 @@ from django_future.csrf import ensure_csrf_cookie
from
django.http
import
HttpResponse
import
json
from
fs.osfs
import
OSFS
@ensure_csrf_cookie
def
index
(
request
):
...
...
@@ -32,3 +33,16 @@ def save_item(request):
data
=
json
.
loads
(
request
.
POST
[
'data'
])
keystore
()
.
update_item
(
item_id
,
data
)
return
HttpResponse
(
json
.
dumps
({}))
def
temp_force_export
(
request
):
org
=
'mit.edu'
course
=
'6002xs12'
name
=
'6.002_Spring_2012'
course
=
keystore
()
.
get_item
([
'i4x'
,
org
,
course
,
'course'
,
name
])
fs
=
OSFS
(
'../data-export-test'
)
xml
=
course
.
export_to_xml
(
fs
)
with
fs
.
open
(
'course.xml'
,
'w'
)
as
course_xml
:
course_xml
.
write
(
xml
)
return
HttpResponse
(
'Done'
)
cms/urls.py
View file @
1e8acbef
...
...
@@ -8,4 +8,5 @@ urlpatterns = patterns('',
url
(
r'^$'
,
'contentstore.views.index'
,
name
=
'index'
),
url
(
r'^edit_item$'
,
'contentstore.views.edit_item'
,
name
=
'edit_item'
),
url
(
r'^save_item$'
,
'contentstore.views.save_item'
,
name
=
'save_item'
),
url
(
r'^temp_force_export$'
,
'contentstore.views.temp_force_export'
)
)
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