Commit ab6f383b by Brian Wilson

support for Pearson test user

parent f1198b5f
...@@ -1099,7 +1099,6 @@ def test_center_login(request): ...@@ -1099,7 +1099,6 @@ def test_center_login(request):
# expected values.... # expected values....
# registration_id = request.POST.get("registrationID") # registration_id = request.POST.get("registrationID")
# exit_url = request.POST.get("exitURL") # exit_url = request.POST.get("exitURL")
# find testcenter_user that matches the provided ID: # find testcenter_user that matches the provided ID:
try: try:
...@@ -1108,7 +1107,6 @@ def test_center_login(request): ...@@ -1108,7 +1107,6 @@ def test_center_login(request):
log.error("not able to find demographics for cand ID {}".format(client_candidate_id)) log.error("not able to find demographics for cand ID {}".format(client_candidate_id))
return HttpResponseRedirect(makeErrorURL(error_url, "invalidClientCandidateID")); return HttpResponseRedirect(makeErrorURL(error_url, "invalidClientCandidateID"));
# find testcenter_registration that matches the provided exam code: # find testcenter_registration that matches the provided exam code:
# Note that we could rely in future on either the registrationId or the exam code, # Note that we could rely in future on either the registrationId or the exam code,
# or possibly both. But for now we know what to do with an ExamSeriesCode, # or possibly both. But for now we know what to do with an ExamSeriesCode,
...@@ -1118,7 +1116,11 @@ def test_center_login(request): ...@@ -1118,7 +1116,11 @@ def test_center_login(request):
log.error("missing exam series code for cand ID {}".format(client_candidate_id)) log.error("missing exam series code for cand ID {}".format(client_candidate_id))
return HttpResponseRedirect(makeErrorURL(error_url, "missingExamSeriesCode")); return HttpResponseRedirect(makeErrorURL(error_url, "missingExamSeriesCode"));
exam_series_code = request.POST.get('vueExamSeriesCode') exam_series_code = request.POST.get('vueExamSeriesCode')
# special case for supporting test user:
if client_candidate_id == "edX003671291147" and exam_series_code != '6002x001':
log.warning("test user {} using unexpected exam code {}, coercing to 6002x001".format(client_candidate_id, exam_series_code))
exam_series_code = '6002x001'
registrations = TestCenterRegistration.objects.filter(testcenter_user=testcenteruser, exam_series_code=exam_series_code) registrations = TestCenterRegistration.objects.filter(testcenter_user=testcenteruser, exam_series_code=exam_series_code)
if not registrations: if not registrations:
log.error("not able to find exam registration for exam {} and cand ID {}".format(exam_series_code, client_candidate_id)) log.error("not able to find exam registration for exam {} and cand ID {}".format(exam_series_code, client_candidate_id))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment