Skip to content

Commit

Permalink
Merge pull request #146 from edx/hasnain-naveed/PHX-131
Browse files Browse the repository at this point in the history
text changes
  • Loading branch information
chrisndodge committed Sep 10, 2015
2 parents 8877784 + 0540bea commit d33ad66
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 136 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,25 @@
<div class="sequence proctored-exam entrance" data-exam-id="{{exam_id}}">
<h3>
{% blocktrans %}
Would you like to take "{{ display_name }}" as a proctored exam?
This exam is proctored.
{% endblocktrans %}
</h3>
<p>
{% blocktrans %}
As a verified learner in this course, you have the option of taking this exam with online proctoring.
To be eligible to earn credit for this course, you must take and pass the proctoring review for this exam.
{% endblocktrans %}
</p>
<button class="gated-sequence start-timed-exam" data-ajax-url="{{enter_exam_endpoint}}" data-exam-id="{{exam_id}}" data-attempt-proctored=true data-start-immediately=false>
<span><i class="fa fa-lock"></i></span>
<a>
{% trans "Yes, I want to take this exam with online proctoring (and be eligible for credit)" %}
{% trans "Continue to my proctored exam. I want to be eligible for credit." %}
</a>
<p>
{% blocktrans %}
You will be guided through steps to set up online proctoring software and to perform various checks.</br>
&#8226; Have your photo ID ready so that you can verify your identity. </br>
&#8226; Be ready to start your exam after you complete the proctoring setup. </br>

{% endblocktrans %}
</p>

<i class="fa fa-arrow-circle-right"></i>
</button>
<button class="gated-sequence start-timed-exam" data-attempt-proctored=false>
<span><i class="fa fa-unlock"></i></span>
<a>
{% trans "No, I want to take this exam without proctoring (and not be eligible for credit)" %}
{% trans "Take this exam without proctoring. I am not interested in academic credit." %}
</a>
<p>
{% blocktrans %}
If you take this exam without proctoring, you will not be eligible to use this course for academic credit,
even if you achieve a passing grade.
{% endblocktrans %}
</p>
<i class="fa fa-arrow-circle-right"></i>
</button>
</div>
Expand All @@ -50,15 +33,15 @@ <h3>
</div>
<div class="msg-content">
{% blocktrans %}
You will no longer be eligible to use this course for academic credit.
If you take this exam without proctoring, you will <strong> no longer be eligible for academic credit. </strong>
{% endblocktrans %}
</div>
<div class="proctored-exam-skip-actions">
<button class="proctored-exam-skip-cancel-button btn btn-default btn-base">
{% trans "Cancel" %}
</button>
<button class="proctored-exam-skip-confirm-button btn btn-primary btn-base" data-ajax-url="{{enter_exam_endpoint}}" data-exam-id="{{exam_id}}">
{% trans "Yes, Take this as an open exam" %}
{% trans "Continue Exam Without Proctoring" %}
</button>
<button class="proctored-exam-skip-cancel-button btn btn-default btn-base">
{% trans "Go Back" %}
</button>
</div>
<div class="clearfix"></div>
Expand Down Expand Up @@ -90,7 +73,7 @@ <h3>
alert(msg);
});
};

var inProcess = false;

var disableClickEvent = function (selector) {
Expand All @@ -110,7 +93,7 @@ <h3>
$( this ).css('cursor', 'pointer');
});
};

$('.start-timed-exam').click(
function() {
if (!inProcess) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
{% load i18n %}
<div class="faq-proctoring-exam">
<h4> {% trans "See Also" %} </h4>
<p>
<a class="footer-link" href="{{link_urls.faq}}" target="_blank">
{% blocktrans %}
Frequently asked questions about proctoring and earning college credit
{% endblocktrans %}
</a>
<a class="footer-link" href="{{link_urls.online_proctoring_rules}}" target="_blank">
{% blocktrans %}
Online proctoring rules
{% endblocktrans %}
</a>
<a class="footer-link" href="{{link_urls.tech_requirements}}" target="_blank">
{% blocktrans %}
Technical Requirements for taking a proctored exam
About Proctored Exams
{% endblocktrans %}
</a>
</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,47 +1,41 @@
{% load i18n %}
<div class="sequence proctored-exam instructions message-top-bar" data-exam-id="{{exam_id}}" data-exam-started-poll-url="{{exam_started_poll_url}}">
<h3>
{% blocktrans %}
You Have Chosen To Take a Proctored Exam
{% endblocktrans %}
</h3>
<p>
{% blocktrans %}
You must set up and start the proctoring software before you begin your exam
{% endblocktrans %}
</p>
<div class="proctored-exam-message">
<div class="sequence proctored-exam instructions message-left-bar" data-exam-id="{{exam_id}}" data-exam-started-poll-url="{{exam_started_poll_url}}">

<div class="">
<h3>
{% blocktrans %}
Install and Set Up Proctoring Software
Follow these steps to set up and start your proctored exam.
{% endblocktrans %}
</h3>
<p>
{% blocktrans %}
1. Open the proctoring software installation window and follow the instructions to <a href="{{software_download_url}}" target="_blank">install and set up the proctoring software</a>.
1. Copy this unique exam code. You will be prompted to paste this code later before you start the exam.
{% endblocktrans %}
</p>
<p>
{% blocktrans %}
2. Copy this unique exam code and paste it in the proctoring software window when you are asked for it.
{% endblocktrans %}
<span class="proctored-exam-code">{{exam_code}}</span>
</p>
<p>
<span class="proctored-exam-code" role="application">{{exam_code}}</span>&nbsp;<button class='proctored-exam-select-code'>Select exam code</button>
{% blocktrans %}
Select the exam code, then copy it using Command+C (Mac) or Control+C (Windows).
{% endblocktrans %}
</p>
<p>
{% blocktrans %}
Do not share this code. It is linked to your {{platform_name}} account and can be used only once.
2. Follow the link below to set up proctoring.
{% endblocktrans %}
</p>
<p>
<span><a href="{{software_download_url}}" target="_blank">Start System Check</a></span>
</p>
<p>
{% blocktrans %}
3. Keep the proctoring session window open while you are taking the exam. If you close it, the proctoring recording is stopped and you will not successfully complete the proctored exam.
A new window will open. You will run a system check before downloading the proctoring application.
{% endblocktrans %}
</p>
<p>
{% blocktrans %}
4. Return to the {{platform_name}} courseware to start your exam.
You will be asked to verify your identity before you begin the exam. Make sure you have valid photo identification, such as a driver's license or passport, before you continue.
{% endblocktrans %}
</p>
</div>
Expand Down Expand Up @@ -93,31 +87,6 @@ <h3>
}
);

$('.proctored-exam-select-code').click(function() {
selectText($('.proctored-exam-code'));
$(event.currentTarget).blur();
});

function selectText(textToBeSelected) {
// this selects all the text in an element
// http://stackoverflow.com/questions/12243898/how-to-select-all-text-in-contenteditable-div
var doc = document,
range, selection,
element = textToBeSelected[0];

if (doc.body.createTextRange) {
range = doc.body.createTextRange();
range.moveToElementText(element);
range.select();
} else if (window.getSelection) {
selection = window.getSelection();
range = doc.createRange();
range.selectNodeContents(element);
selection.removeAllRanges();
selection.addRange(range);
}
}

$(document).ready(function(){
_waiting_for_proctored_interval = setInterval(
poll_exam_started,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
{% load i18n %}
<div class="sequence proctored-exam success-top-bar instructions" data-exam-id="{{exam_id}}" data-exam-started-poll-url="{{exam_started_poll_url}}">
<h3>
{% blocktrans %}
Your Proctoring Installation and Set Up is Complete
{% endblocktrans %}
</h3>
<p>
{% blocktrans %}
Do not close the proctoring session window until you have completed and submitted your exam.
{% endblocktrans %}
</p>
<div class="proctored-exam-message">
<div class="sequence proctored-exam success-left-bar instructions" data-exam-id="{{exam_id}}" data-exam-started-poll-url="{{exam_started_poll_url}}">
<div>
<h3>
{% blocktrans %}
You Can Begin Your Exam Now
Follow these instructions
{% endblocktrans %}
</h3>
<p>
{% blocktrans %}
When you start your exam you will have {{total_time}} to complete it. You cannot stop the timer once you start.
{% endblocktrans %}
{% blocktrans %}
If the allotted time expires before you mark your exam as ended, the answers you have completed up to that point are submitted for grading, and your proctoring session is uploaded for review.
&#8226; Do not close the proctoring window until you have completed and submitted your exam. </br>
&#8226; When you start your exam you will have {{ total_time }} to complete it. </br>
&#8226; If the allotted time expires before your end your exam, the answers you have completed up
to that point are submitted for grading and your proctoring session is uploaded for review. </br>
{% endblocktrans %}
</p>
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,29 @@
<div class="sequence proctored-exam entrance" data-exam-id="{{exam_id}}">
<h3>
{% blocktrans %}
Would you like to take "{{ display_name }}" as a practice proctored exam?
Try a proctored exam
{% endblocktrans %}
</h3>
<p>
{% blocktrans %}
You can try this practice exam as many times as you want.
Get familiar with proctoring for real exams later in the course. This practice exam has no impact
on your grade in the course.
{% endblocktrans %}
</p>
<button class="gated-sequence start-timed-exam" data-ajax-url="{{enter_exam_endpoint}}" data-exam-id="{{exam_id}}" data-attempt-proctored=true data-start-immediately=false>
<span><i class="fa fa-lock"></i></span>
<a>
{% trans "Yes, I want to take this practice exam with online proctoring" %}
{% trans "Continue to my practice exam" %}
</a>
<p>
{% blocktrans %}
You will be guided through steps to set up online proctoring software and to perform various checks.
When you start the exam, the timer on the right shows the time remaining in the exam.
{% endblocktrans %}
</p>

<i class="fa fa-arrow-circle-right start-timed-exam" data-ajax-url="{{enter_exam_endpoint}}" data-exam-id="{{exam_id}}" data-attempt-proctored=true data-start-immediately=false></i>
<i class="fa fa-arrow-circle-right practice-exam start-timed-exam" data-ajax-url="{{enter_exam_endpoint}}" data-exam-id="{{exam_id}}" data-attempt-proctored=true data-start-immediately=false></i>
</button>
</div>
{% include 'proctoring/seq_proctored_exam_footer.html' %}
{% include 'proctoring/seq_proctored_practice_exam_footer.html' %}

<script type="text/javascript">

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% load i18n %}
<div class="faq-proctoring-exam">
<p>
<a class="footer-link" href="{{link_urls.faq}}" target="_blank">
{% blocktrans %}
About Proctored Exams
{% endblocktrans %}
</a>
</p>
</div>
31 changes: 6 additions & 25 deletions edx_proctoring/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def setUp(self):
self.disabled_exam_id = self._create_disabled_exam()

# Messages for get_student_view
self.start_an_exam_msg = 'Would you like to take "%s" as a proctored exam?'
self.start_an_exam_msg = 'This exam is proctored.'
self.timed_exam_msg = '%s is a Timed Exam'
self.exam_time_expired_msg = 'You did not complete the exam in the allotted time'
self.exam_time_error_msg = 'There was a problem with your proctoring session'
Expand All @@ -105,9 +105,9 @@ def setUp(self):
self.proctored_exam_verified_msg = 'Your proctoring session was reviewed and passed all requirements'
self.proctored_exam_rejected_msg = 'Your proctoring session was reviewed and did not pass requirements'
self.timed_exam_completed_msg = 'This is the end of your timed exam'
self.start_a_practice_exam_msg = 'Would you like to take "%s" as a practice proctored exam?'
self.start_a_practice_exam_msg = 'Get familiar with proctoring for real exams later in the course.'
self.practice_exam_submitted_msg = 'You have submitted this practice proctored exam'
self.ready_to_start_msg = 'Your Proctoring Installation and Set Up is Complete'
self.ready_to_start_msg = 'Follow these instructions'
self.practice_exam_failed_msg = 'There was a problem with your practice proctoring session'
self.proctored_exam_email_subject = 'Proctoring Session Results Update'
self.proctored_exam_email_body = 'the status of your proctoring session review'
Expand Down Expand Up @@ -645,7 +645,7 @@ def test_get_student_view(self):
}
)
self.assertIn('data-exam-id="%d"' % self.proctored_exam_id, rendered_response)
self.assertIn(self.start_an_exam_msg % self.exam_name, rendered_response)
self.assertIn(self.start_an_exam_msg, rendered_response)

# try practice exam variant
rendered_response = get_student_view(
Expand All @@ -659,7 +659,7 @@ def test_get_student_view(self):
'is_practice_exam': True,
}
)
self.assertIn(self.start_a_practice_exam_msg % self.exam_name, rendered_response)
self.assertIn(self.start_a_practice_exam_msg, rendered_response)

def test_get_honor_view_with_practice_exam(self): # pylint: disable=invalid-name
"""
Expand Down Expand Up @@ -794,25 +794,6 @@ def test_get_disabled_student_view(self):
)
)

def test_get_studentview_unstarted_exam(self): # pylint: disable=invalid-name
"""
Test for get_student_view proctored exam which has not started yet.
"""

self._create_unstarted_exam_attempt()

rendered_response = get_student_view(
user_id=self.user_id,
course_id=self.course_id,
content_id=self.content_id,
context={
'is_proctored': True,
'display_name': self.exam_name,
'default_time_limit_mins': 90
}
)
self.assertIn(self.chose_proctored_exam_msg, rendered_response)

def test_declined_attempt(self):
"""
Make sure that a declined attempt does not show proctoring
Expand Down Expand Up @@ -1073,7 +1054,7 @@ def test_get_studentview_unstarted_timed_exam(self): # pylint: disable=invalid-
)
self.assertNotIn('data-exam-id="%d"' % self.proctored_exam_id, rendered_response)
self.assertIn(self.timed_exam_msg % self.exam_name, rendered_response)
self.assertNotIn(self.start_an_exam_msg % self.exam_name, rendered_response)
self.assertNotIn(self.start_an_exam_msg, rendered_response)

def test_get_studentview_completed_timed_exam(self): # pylint: disable=invalid-name
"""
Expand Down
2 changes: 0 additions & 2 deletions edx_proctoring/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,6 @@ def get(self, request, attempt_id):
remaining_time=humanized_time(int(round(time_remaining_seconds / 60.0, 0)))
)

print attempt['accessibility_time_string']

return Response(
data=attempt,
status=status.HTTP_200_OK
Expand Down

0 comments on commit d33ad66

Please sign in to comment.