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
c4bed2c1
Commit
c4bed2c1
authored
Aug 14, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add basic authentication support for requests made to the xqueue server
parent
43745dac
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
10 deletions
+14
-10
cms/envs/common.py
+3
-2
common/lib/capa/capa/xqueue_interface.py
+3
-3
lms/djangoapps/courseware/module_render.py
+2
-1
lms/envs/dev.py
+3
-2
lms/envs/test.py
+3
-2
No files found.
cms/envs/common.py
View file @
c4bed2c1
...
...
@@ -94,8 +94,9 @@ JASMINE_TEST_DIRECTORY = PROJECT_ROOT + '/static/coffee'
#################### CAPA External Code Evaluation #############################
XQUEUE_INTERFACE
=
{
'url'
:
'http://localhost:8888'
,
'auth'
:
{
'username'
:
'local'
,
'password'
:
'local'
}
'django_auth'
:
{
'username'
:
'local'
,
'password'
:
'local'
},
'basic_auth'
:
None
,
}
...
...
common/lib/capa/capa/xqueue_interface.py
View file @
c4bed2c1
...
...
@@ -60,10 +60,10 @@ class XQueueInterface:
Interface to the external grading system
'''
def
__init__
(
self
,
url
,
auth
):
def
__init__
(
self
,
url
,
django_auth
,
basic_auth
=
None
):
self
.
url
=
url
self
.
auth
=
auth
self
.
session
=
requests
.
session
()
self
.
auth
=
django_
auth
self
.
session
=
requests
.
session
(
auth
=
basic_auth
)
def
send_to_queue
(
self
,
header
,
body
,
file_to_upload
=
None
):
'''
...
...
lms/djangoapps/courseware/module_render.py
View file @
c4bed2c1
...
...
@@ -25,7 +25,8 @@ log = logging.getLogger("mitx.courseware")
xqueue_interface
=
XQueueInterface
(
settings
.
XQUEUE_INTERFACE
[
'url'
],
settings
.
XQUEUE_INTERFACE
[
'auth'
]
settings
.
XQUEUE_INTERFACE
[
'django_auth'
],
settings
.
XQUEUE_INTERFACE
[
'basic_auth'
],
)
...
...
lms/envs/dev.py
View file @
c4bed2c1
...
...
@@ -55,10 +55,11 @@ CACHES = {
XQUEUE_INTERFACE
=
{
"url"
:
"http://xqueue.sandbox.edx.org"
,
"auth"
:
{
"
django_
auth"
:
{
"username"
:
"lms"
,
"password"
:
"***REMOVED***"
}
},
"basic_auth"
:
(
'anant'
,
'agarwal'
),
}
# Make the keyedcache startup warnings go away
...
...
lms/envs/test.py
View file @
c4bed2c1
...
...
@@ -52,10 +52,11 @@ GITHUB_REPO_ROOT = ENV_ROOT / "data"
XQUEUE_INTERFACE
=
{
"url"
:
"http://xqueue.sandbox.edx.org"
,
"auth"
:
{
"
django_
auth"
:
{
"username"
:
"lms"
,
"password"
:
"***REMOVED***"
}
},
"basic_auth"
:
(
'anant'
,
'agarwal'
),
}
...
...
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