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
3b3482b3
Commit
3b3482b3
authored
Aug 02, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skeleton for S3 upload by LMS
parent
688f8914
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
lms/djangoapps/courseware/module_render.py
+5
-5
lms/djangoapps/courseware/xqueue_interface.py
+2
-1
No files found.
lms/djangoapps/courseware/module_render.py
View file @
3b3482b3
...
...
@@ -285,12 +285,12 @@ def modx_dispatch(request, dispatch=None, id=None):
qsdict
[
key
]
=
qsdict
[
key
][
0
]
# parse_qs returns { key: list }
post
.
update
(
qsdict
)
# Check for submitted files
# Check for submitted files, send it to S3 immediately. LMS/xqueue manipulates only the
# pointer, which is saved as the student "submission"
if
request
.
FILES
:
print
'Got files!'
print
post
.
keys
()
print
request
.
FILES
.
keys
()
for
inputfile_id
in
request
.
FILES
.
keys
():
s3_identifier
=
xqueue_interface
.
upload_files_to_s3
(
request
.
FILES
[
inputfile_id
])
post
.
update
({
inputfile_id
:
s3_identifier
})
student_module_cache
=
StudentModuleCache
(
request
.
user
,
modulestore
()
.
get_item
(
id
))
instance
,
instance_module
,
shared_module
,
module_type
=
get_module
(
request
.
user
,
request
,
id
,
student_module_cache
)
...
...
lms/djangoapps/courseware/xqueue_interface.py
View file @
3b3482b3
...
...
@@ -8,8 +8,9 @@ import requests
XQUEUE_LMS_AUTH
=
(
'LMS'
,
'PaloAltoCA'
)
# (username, password)
XQUEUE_SUBMIT_URL
=
'http://xqueue.edx.org'
def
upload_files_to_s3
():
def
upload_files_to_s3
(
submission_file
):
print
' THK: xqueue_interface.upload_files_to_s3'
return
''
def
make_xheader
(
lms_callback_url
,
lms_key
,
queue_name
):
...
...
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