From a5cce4769e5746362ea4f3c81b3f78d8a737516e Mon Sep 17 00:00:00 2001
From: Brian Wilson
Date: Wed, 9 Jan 2013 02:14:02 -0500
Subject: [PATCH] add accommodation listing, and revise error messages
---
common/djangoapps/student/models.py | 18 +++---
lms/templates/dashboard.html | 2 +-
lms/templates/test_center_register.html | 82 +++++--------------------
3 files changed, 22 insertions(+), 80 deletions(-)
diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py
index 955876eb66..d9ac973271 100644
--- a/common/djangoapps/student/models.py
+++ b/common/djangoapps/student/models.py
@@ -53,9 +53,6 @@ from django.forms import ModelForm, forms
import comment_client as cc
from django_comment_client.models import Role
-from feedparser import binascii
-import os
-
log = logging.getLogger(__name__)
@@ -329,7 +326,7 @@ class TestCenterUserForm(ModelForm):
# our own code to indicate that a request has been rejected.
ACCOMMODATION_REJECTED_CODE = 'NONE'
-ACCOMODATION_CODES = (
+ACCOMMODATION_CODES = (
(ACCOMMODATION_REJECTED_CODE, 'No Accommodation Granted'),
('EQPMNT', 'Equipment'),
('ET12ET', 'Extra Time - 1/2 Exam Time'),
@@ -342,6 +339,8 @@ ACCOMODATION_CODES = (
('SRSEAN', 'Separate Room and Service Animal'),
('SRSGNR', 'Separate Room and Sign Language Interpreter'),
)
+
+ACCOMMODATION_CODE_DICT = { code : name for (code, name) in ACCOMMODATION_CODES }
class TestCenterRegistration(models.Model):
"""
@@ -494,14 +493,11 @@ class TestCenterRegistration(models.Model):
def is_pending(self):
return not self.is_accepted and not self.is_rejected
- @property
- def is_pending_accommodation(self):
- return self.accommodation_is_pending
-
- @property
- def is_pending_acknowledgement(self):
- return (not self.is_accepted and not self.is_rejected) and not self.is_pending_accommodation
+ def get_accommodation_codes(self):
+ return self.accommodation_code.split('*')
+ def get_accommodation_names(self):
+ return [ ACCOMMODATION_CODE_DICT.get(code, "Unknown code " + code) for code in self.get_accommodation_codes() ]
class TestCenterRegistrationForm(ModelForm):
class Meta:
diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html
index c210f6e7be..ba827e1219 100644
--- a/lms/templates/dashboard.html
+++ b/lms/templates/dashboard.html
@@ -249,7 +249,7 @@
Your
registration for the Pearson exam
has been rejected. Please check the information you provided, and try to correct any demographic errors. Otherwise
- contact someone at edX or Pearson, or just scream for help.
+ contact edX for further help.
% endif
diff --git a/lms/templates/test_center_register.html b/lms/templates/test_center_register.html
index f972599b7a..0db34cec00 100644
--- a/lms/templates/test_center_register.html
+++ b/lms/templates/test_center_register.html
@@ -102,12 +102,14 @@
% if registration:
+
+ <% exam_help_href = "mailto:exam-help@edx.org?subject=Pearson VUE Exam - %s %s".format(get_course_about_section(course, 'university'), course.number) %>
% if registration.is_rejected:
Your registration for the Pearson exam has been rejected
- Please check the information you provided, and try to correct any demographic errors. Otherwise contact someone at edX or Pearson, or just scream for help.
- Contact exam-help@edx.org
+ Please check the information you provided, and try to correct any demographic errors. Otherwise contact edX at exam-help@edx.org.
+ Contact exam-help@edx.org
% endif
@@ -344,7 +346,10 @@
% if registration.demographics_is_rejected:
Demographic Information
- The demographic information you most recently provided has been rejected by Pearson. You can correct and submit it again before the exam registration closes on ${exam_info.registration_end_date_text}.
+ The demographic information you most recently provided has been rejected by Pearson. You can correct and submit it again before the exam registration closes on ${exam_info.registration_end_date_text}.
+ The error message is:
+ ${registration.testcenter_user.upload_error_message}.
+ If the error is not correctable by revising demographic information and resubmitting, please contact edX at exam-help@edx.org.
% endif
@@ -361,9 +366,9 @@
Your requested accommodations have been reviewed and processed. You are allowed:
- - Extra Time - Double Time
- - Separate Room & Reader/Recorder
- - Equipment
+ % for accommodation_name in registration.get_accommodation_names():
+ - ${accommodation_name}
+ % endfor
% endif
@@ -390,7 +395,9 @@
% if registration.registration_is_rejected:
Registration Request
- Your exam registration has been rejected by Pearson. You currently cannot schedule an exam.
+ Your exam registration has been rejected by Pearson. You currently cannot schedule an exam.
+ Please contact edX at exam-help@edx.org. The error message is:
+ ${registration.upload_error_message}.
% endif
@@ -398,67 +405,6 @@
-
-
-
Pearson Exam Registration Status
-
-
- -
-
Demographic Information
- The demographic information you most recently provided has been processed. You may edit this information at any point before exam registration closes on ${exam_info.registration_end_date_text}
-
- -
-
Accommodations Request
- Your requested accommodations are pending. Within a few days, you should see confirmation here of granted accommodations.
-
- -
-
Registration Request
- Your exam registration is pending. Once your information is processed, it will be forwarded to Pearson and you will be able to schedule an exam.
-
-
-
-
-
-
-
Pearson Exam Registration Status
-
-
- -
-
Demographic Information
- The demographic information you most recently provided has been processed. You may edit this information at any point before exam registration closes on ${exam_info.registration_end_date_text}
-
- -
-
Accommodations Request
- Your requested accommodations have been reviewed and processed. You are allowed:
-
-
- - Extra Time - Double Time
- - Separate Room & Reader/Recorder
- - Equipment
-
-
- -
-
Registration Request
- Your exam registration has been processed and has been forwarded to Pearson. You are now able to schedule an exam.
-
-
-
-
-
-
-
Pearson Exam Registration Status
-
-
- -
-
Demographic Information
- The demographic information you most recently provided has been rejected by Pearson. You can correct and submit it again before the exam registration closes on ${exam_info.registration_end_date_text}.
-
- -
-
Registration Request
- Your exam registration has been rejected by Pearson. You currently cannot schedule an exam.
-
-
-
% endif