From dd50ec4e827b31a8d4e1eb2bbfaad1a2a05c4996 Mon Sep 17 00:00:00 2001
From: David Ormsbee
Date: Mon, 26 Aug 2013 14:31:36 -0400
Subject: [PATCH] Merge design and dev JS/UI for verify student
---
common/djangoapps/course_modes/views.py | 4 +-
lms/djangoapps/verify_student/urls.py | 19 +--
lms/djangoapps/verify_student/views.py | 2 +-
lms/templates/courseware/course_about.html | 2 +-
.../verify_student/photo_id_upload.html | 2 +-
.../verify_student/photo_verification.html | 153 +++++++++++-------
.../verify_student/show_requirements.html | 7 +-
7 files changed, 114 insertions(+), 75 deletions(-)
diff --git a/common/djangoapps/course_modes/views.py b/common/djangoapps/course_modes/views.py
index cd85146254..e6add0e498 100644
--- a/common/djangoapps/course_modes/views.py
+++ b/common/djangoapps/course_modes/views.py
@@ -58,9 +58,11 @@ class ChooseModeView(View):
donation_for_course[course_id] = float(amount)
request.session["donation_for_course"] = donation_for_course
+ # TODO: Check here for minimum pricing
+
return redirect(
"{}?{}".format(
- reverse('verify_student_verify'),
+ reverse('verify_student_show_requirements'),
urlencode(dict(course_id=course_id))
)
)
diff --git a/lms/djangoapps/verify_student/urls.py b/lms/djangoapps/verify_student/urls.py
index 3f1a35685d..f5fc5d2f7e 100644
--- a/lms/djangoapps/verify_student/urls.py
+++ b/lms/djangoapps/verify_student/urls.py
@@ -5,11 +5,6 @@ from verify_student import views
urlpatterns = patterns(
'',
- url(
- r'^show_requirements',
- views.show_requirements,
- name="verify_student/show_requirements"
- ),
url(
r'^face_upload',
views.face_upload,
@@ -29,9 +24,9 @@ urlpatterns = patterns(
# The above are what we did for the design mockups, but what we're really
# looking at now is:
url(
- r'^show_verification_page',
- views.show_verification_page,
- name="verify_student/show_verification_page"
+ r'^show_requirements',
+ views.show_requirements,
+ name="verify_student_show_requirements"
),
url(
@@ -44,6 +39,12 @@ urlpatterns = patterns(
r'^create_order',
views.create_order,
name="verify_student_create_order"
- )
+ ),
+
+ url(
+ r'^show_verification_page',
+ views.show_verification_page,
+ name="verify_student/show_verification_page"
+ ),
)
diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py
index 78c653bea7..631a54bb93 100644
--- a/lms/djangoapps/verify_student/views.py
+++ b/lms/djangoapps/verify_student/views.py
@@ -77,7 +77,7 @@ def create_order(request):
def show_requirements(request):
"""This might just be a plain template without a view."""
- context = { "course_id" : "edX/Certs101/2013_Test" }
+ context = { "course_id" : request.GET.get("course_id") }
return render_to_response("verify_student/show_requirements.html", context)
def face_upload(request):
diff --git a/lms/templates/courseware/course_about.html b/lms/templates/courseware/course_about.html
index 62dd2eb60d..17c18c2d90 100644
--- a/lms/templates/courseware/course_about.html
+++ b/lms/templates/courseware/course_about.html
@@ -101,7 +101,7 @@
%else:
${_("Register for {course.display_number_with_default}").format(course=course) | h}
- Mock Verify Enrollment
+ Mock Verify Enrollment
%endif
diff --git a/lms/templates/verify_student/photo_id_upload.html b/lms/templates/verify_student/photo_id_upload.html
index 3648b3ab6a..1c8ec47dd7 100644
--- a/lms/templates/verify_student/photo_id_upload.html
+++ b/lms/templates/verify_student/photo_id_upload.html
@@ -122,7 +122,7 @@ $(document).ready(function() {
- Select Certificate
+ Select Certificate
diff --git a/lms/templates/verify_student/photo_verification.html b/lms/templates/verify_student/photo_verification.html
index bdf7a6d1ab..bb69d04f2a 100644
--- a/lms/templates/verify_student/photo_verification.html
+++ b/lms/templates/verify_student/photo_verification.html
@@ -93,13 +93,44 @@
}, onVideoFail);
}
+ function initPhotoBlocks() {
+ // Photo wrapping
+ $('.block-photo .control-redo').addClass('is-hidden');
+ $('.block-photo .control-approve').addClass('is-hidden');
+ $('.block-photo .m-btn-primary').addClass('disabled');
+ $( "#wrapper-facephoto .control-do" ).click(function(e) {
+ e.preventDefault();
+ $(this).toggleClass('is-hidden');
+ $('#wrapper-facephoto .control-redo').toggleClass('is-shown');
+ $('#wrapper-facephoto .control-approve').toggleClass('is-shown');
+ });
+ $( "#wrapper-facephoto .control-approve" ).click(function(e) {
+ e.preventDefault();
+ $(this).addClass('approved');
+ $('#wrapper-facephoto .m-btn-primary').removeClass('disabled');
+ });
+ $( "#wrapper-idphoto .control-do" ).click(function(e) {
+ e.preventDefault();
+ $(this).toggleClass('is-hidden');
+ $('#wrapper-idphoto .control-redo').toggleClass('is-shown');
+ $('#wrapper-idphoto .control-approve').toggleClass('is-shown');
+ });
+ $( "#wrapper-idphoto .control-approve" ).click(function(e) {
+ e.preventDefault();
+ $(this).addClass('approved');
+ $('#wrapper-idphoto .m-btn-primary').removeClass('disabled');
+ });
+ }
+
$(document).ready(function() {
$(".carousel-nav").addClass('sr');
$("#pay_button").click(submitToPaymentProcessing);
+ initPhotoBlocks();
initVideoCapture();
initSnapshotHandler("face");
initSnapshotHandler("photo_id");
+
});
@@ -141,12 +172,12 @@
- -
- Take photo
-
-
Retake
+ -
+ Take photo
+
-
Looks good
@@ -169,32 +200,25 @@
Common Questions
-
- - Cras justo odio, dapibus ac facilisis in, egestas eget quam.
- - Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- - Vestibulum id ligula porta felis euismod semper.
- - Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.
- - Aenean eu leo quam.
- - Pellentesque ornare sem lacinia quam venenatis vestibulum.
- - Maecenas faucibus mollis interdum.
-
+
+ - Why do you need my photo?
+ - We need your photo to confirm that you are you.
+
+ - What do you do with this picture?
+ - We only use it to verify your identity. It is not displayed anywhere.
+
-
-
-
-
-
+
Take Your Photo
Use your webcam to take a picture of your face so we can match it with the picture on your ID.
@@ -209,18 +233,17 @@
-
@@ -239,7 +262,7 @@
Common Questions
-
+
- Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.
- Aenean eu leo quam.
- Pellentesque ornare sem lacinia quam venenatis vestibulum.
@@ -250,27 +273,24 @@
-
-
-
+
Verify Your Submission
Make sure we can verify your identity with the photos and information below.
Check Your Name
-
Make sure your full name on your edX account, ${user_full_name}, matches your ID. We will also use this as the name on your certificate.
+
Make sure your full name on your edX account, [User Name], matches your ID. We will also use this as the name on your certificate.
Edit my name
@@ -302,37 +322,54 @@
+
+
+
+
Check Your Contribution
+
+
+ -
+ Select your contribution for this course:
+
+ -
+
+
+
+
+
-
diff --git a/lms/templates/verify_student/show_requirements.html b/lms/templates/verify_student/show_requirements.html
index b794317311..9e4780be0f 100644
--- a/lms/templates/verify_student/show_requirements.html
+++ b/lms/templates/verify_student/show_requirements.html
@@ -8,7 +8,7 @@
@@ -52,7 +52,7 @@
Steps to get Verified
1 Take Your Photo
@@ -82,9 +82,8 @@
You are now verified. You can sign up for more courses, or get started on your course once it starts. While you will need to re-verify in the course prior to exams or expercises, you may also have to re-verify if we feel your photo we have on file may be out of date.
-