Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
8ce12b10
Commit
8ce12b10
authored
12 years ago
by
Calen Pennington
Browse files
Options
Downloads
Patches
Plain Diff
Pass HttpBasicAuth object to requests, rather than a list, which it didn't understand
parent
c4bed2c1
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/lib/capa/capa/xqueue_interface.py
+2
-2
2 additions, 2 deletions
common/lib/capa/capa/xqueue_interface.py
lms/djangoapps/courseware/module_render.py
+7
-1
7 additions, 1 deletion
lms/djangoapps/courseware/module_render.py
with
9 additions
and
3 deletions
common/lib/capa/capa/xqueue_interface.py
+
2
−
2
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
):
'''
...
...
This diff is collapsed.
Click to expand it.
lms/djangoapps/courseware/module_render.py
+
7
−
1
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
,
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment