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
8ce12b10
Commit
8ce12b10
authored
Aug 14, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass HttpBasicAuth object to requests, rather than a list, which it didn't understand
parent
c4bed2c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
common/lib/capa/capa/xqueue_interface.py
+2
-2
lms/djangoapps/courseware/module_render.py
+7
-1
No files found.
common/lib/capa/capa/xqueue_interface.py
View file @
8ce12b10
...
...
@@ -60,10 +60,10 @@ class XQueueInterface:
Interface to the external grading system
'''
def
__init__
(
self
,
url
,
django_auth
,
basic
_auth
=
None
):
def
__init__
(
self
,
url
,
django_auth
,
requests
_auth
=
None
):
self
.
url
=
url
self
.
auth
=
django_auth
self
.
session
=
requests
.
session
(
auth
=
basic
_auth
)
self
.
session
=
requests
.
session
(
auth
=
requests
_auth
)
def
send_to_queue
(
self
,
header
,
body
,
file_to_upload
=
None
):
'''
...
...
lms/djangoapps/courseware/module_render.py
View file @
8ce12b10
...
...
@@ -19,14 +19,20 @@ from xmodule_modifiers import replace_static_urls, add_histogram, wrap_xmodule
from
courseware.courses
import
(
has_staff_access_to_course
,
has_staff_access_to_location
)
from
requests
import
HttpBasicAuth
log
=
logging
.
getLogger
(
"mitx.courseware"
)
if
settings
.
XQUEUE_INTERFACE
[
'basic_auth'
]
is
not
None
:
requests_auth
=
HttpBasicAuth
(
*
settings
.
XQUEUE_INTERFACE
[
'basic_auth'
])
else
:
requests_auth
=
None
xqueue_interface
=
XQueueInterface
(
settings
.
XQUEUE_INTERFACE
[
'url'
],
settings
.
XQUEUE_INTERFACE
[
'django_auth'
],
settings
.
XQUEUE_INTERFACE
[
'basic_auth'
]
,
requests_auth
,
)
...
...
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