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
4b02b2af
Commit
4b02b2af
authored
Nov 07, 2012
by
David Ormsbee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rearrange how we handle the auth tokens for our fake Pearson preliminary testing
parent
528fcd7f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
9 deletions
+15
-9
common/djangoapps/student/management/commands/pearson_export_ead.py
+1
-1
common/djangoapps/student/views.py
+6
-4
lms/envs/aws.py
+3
-4
lms/envs/dev.py
+5
-0
No files found.
common/djangoapps/student/management/commands/pearson_export_ead.py
View file @
4b02b2af
...
...
@@ -49,7 +49,7 @@ class Command(BaseCommand):
ClientAuthorizationID
=
generate_id
(),
ClientCandidateID
=
tcu
.
client_candidate_id
,
ExamAuthorizationCount
=
"1"
,
ExamSeriesCode
=
"
MIT 6.002-
001"
,
ExamSeriesCode
=
"
6002x
001"
,
EligibilityApptDateFirst
=
"2012/12/15"
,
EligibilityApptDateLast
=
"2012/12/30"
,
LastUpdate
=
datetime
.
utcnow
()
.
strftime
(
"
%
Y/
%
m/
%
d
%
H:
%
M:
%
S"
)
...
...
common/djangoapps/student/views.py
View file @
4b02b2af
...
...
@@ -19,7 +19,7 @@ from django.core.context_processors import csrf
from
django.core.mail
import
send_mail
from
django.core.validators
import
validate_email
,
validate_slug
,
ValidationError
from
django.db
import
IntegrityError
from
django.http
import
HttpResponse
,
Http404
from
django.http
import
HttpResponse
,
Http
ResponseForbidden
,
Http
404
from
django.shortcuts
import
redirect
from
mitxmako.shortcuts
import
render_to_response
,
render_to_string
from
bs4
import
BeautifulSoup
...
...
@@ -777,7 +777,7 @@ def accept_name_change(request):
@csrf_exempt
def
test_center_login
(
request
):
if
not
MITX_FEATURES
.
get
(
'ENABLE_PEARSON_HACK_TEST'
):
if
not
settings
.
MITX_FEATURES
.
get
(
'ENABLE_PEARSON_HACK_TEST'
):
raise
Http404
client_candidate_id
=
request
.
POST
.
get
(
"clientCandidateID"
)
...
...
@@ -786,10 +786,12 @@ def test_center_login(request):
error_url
=
request
.
POST
.
get
(
"errorURL"
)
if
client_candidate_id
==
"edX003671291147"
:
authenticate
(
username
=
"pearsontest"
,
password
=
"12345"
)
user
=
authenticate
(
username
=
settings
.
PEARSON_TEST_USER
,
password
=
settings
.
PEARSON_TEST_PASSWORD
)
login
(
request
,
user
)
return
redirect
(
'/courses/MITx/6.002x/2012_Fall/courseware/Final_Exam/Final_Exam_Fall_2012/'
)
else
:
r
aise
Http404
r
eturn
HttpResponseForbidden
()
lms/envs/aws.py
View file @
4b02b2af
...
...
@@ -79,6 +79,5 @@ XQUEUE_INTERFACE = AUTH_TOKENS['XQUEUE_INTERFACE']
if
'COURSE_ID'
in
ENV_TOKENS
:
ASKBOT_URL
=
"courses/{0}/discussions/"
.
format
(
ENV_TOKENS
[
'COURSE_ID'
])
# Temporary hack for testing Pearson
MITX_FEATURES
[
'ENABLE_PEARSON_HACK_TEST'
]
=
True
\ No newline at end of file
PEARSON_TEST_USER
=
"pearsontest"
PEARSON_TEST_PASSWORD
=
AUTH_TOKENS
[
"PEARSON_TEST_PASSWORD"
]
\ No newline at end of file
lms/envs/dev.py
View file @
4b02b2af
...
...
@@ -173,3 +173,8 @@ FILE_UPLOAD_HANDLERS = (
########################### PIPELINE #################################
PIPELINE_SASS_ARGUMENTS
=
'-r {proj_dir}/static/sass/bourbon/lib/bourbon.rb'
.
format
(
proj_dir
=
PROJECT_ROOT
)
########################## PEARSON TESTING ###########################
MITX_FEATURES
[
'ENABLE_PEARSON_HACK_TEST'
]
=
True
PEARSON_TEST_USER
=
"pearsontest"
PEARSON_TEST_PASSWORD
=
"12345"
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