Commit 5db01d89 by Andy Armstrong Committed by GitHub

Merge pull request #315 from edx/andya/support-proctoring-only

Allow authors to remove option for unproctored exams
parents cb9e7767 c12227df
......@@ -1637,7 +1637,6 @@ def _get_proctored_exam_view(exam, context, exam_id, user_id, course_id):
student_view_template = None
credit_state = context.get('credit_state')
verification_status = context.get('verification_status')
# see if only 'verified' track students should see this *except* if it is a practice exam
check_mode = (
......@@ -1727,7 +1726,7 @@ def _get_proctored_exam_view(exam, context, exam_id, user_id, course_id):
return None
elif attempt_status in [ProctoredExamStudentAttemptStatus.created,
ProctoredExamStudentAttemptStatus.download_software_clicked]:
if verification_status is not 'approved':
if context.get('verification_status') is not 'approved':
# if the user has not id verified yet, show them the page that requires them to do so
student_view_template = 'proctored_exam/id_verification.html'
else:
......
......@@ -11,7 +11,7 @@
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>
<button class="gated-sequence start-timed-exam action-primary" data-ajax-url="{{enter_exam_endpoint}}" data-exam-id="{{exam_id}}" data-attempt-proctored=true data-start-immediately=false>
{% trans "Continue to my practice exam" %}
<p>
{% blocktrans %}
......@@ -19,7 +19,7 @@
{% endblocktrans %}
</p>
<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>
<span class="icon fa fa-arrow-circle-right" aria-hidden="true" data-ajax-url="{{enter_exam_endpoint}}" data-exam-id="{{exam_id}}" data-attempt-proctored=true data-start-immediately=false></span>
</button>
</div>
{% include 'proctored_exam/footer.html' %}
......
......@@ -19,8 +19,8 @@
{% endblocktrans %}
</p>
<hr>
<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>
<button class="gated-sequence start-timed-exam action-primary" data-ajax-url="{{enter_exam_endpoint}}" data-exam-id="{{exam_id}}" data-attempt-proctored=true data-start-immediately=false>
<span class="icon fa fa-lock" aria-hidden="true"></span>
<a>
{% trans "Try this practice exam again" %}
</a>
......
......@@ -12,7 +12,7 @@
You have completed this practice exam and can continue with your course work.
{% 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>
<button class="gated-sequence start-timed-exam action-primary" data-ajax-url="{{enter_exam_endpoint}}" data-exam-id="{{exam_id}}" data-attempt-proctored=true data-start-immediately=false>
<a>
{% trans "You can also retry this practice exam" %}
......
......@@ -10,26 +10,19 @@
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>
<button class="gated-sequence start-timed-exam action-primary" data-ajax-url="{{enter_exam_endpoint}}" data-exam-id="{{exam_id}}" data-attempt-proctored=true data-start-immediately=false>
{% trans "Continue to my proctored exam. I want to be eligible for credit." %}
<span class="icon fa fa-arrow-circle-right" aria-hidden="true"></span>
<p>
{% blocktrans %}
You will be guided through steps to set up online proctoring software and to perform various checks.</br>
{% endblocktrans %}
</p>
<i class="fa fa-arrow-circle-right"></i>
</button>
<button class="gated-sequence start-timed-exam" data-attempt-proctored=false>
{% trans "Take this exam without proctoring." %}
<i class="fa fa-arrow-circle-right"></i>
<p>
{% blocktrans %}
I am not interested in academic credit.
{% endblocktrans %}
</p>
</button>
{% if allow_proctoring_opt_out %}
{% include 'proctored_exam/proctoring_opt_out_button.html' %}
{% endif %}
</div>
{% include 'proctored_exam/confirm-decline.html' %}
{% include 'proctored_exam/footer.html' %}
......@@ -26,23 +26,16 @@
{% endfor %}
</ol>
</p>
<p>
{% blocktrans %}
Due to unsatisfied prerequisites, you can only take this exam without proctoring.
{% endblocktrans %}
</p>
<button class="gated-sequence start-timed-exam" data-attempt-proctored=false>
<a>
{% trans "Take this exam without proctoring." %}
</a>
<i class="fa fa-arrow-circle-right"></i>
{% if allow_proctoring_opt_out %}
<p>
{% blocktrans %}
I understand that I am not eligible for academic credit.
Due to unsatisfied prerequisites, you can only take this exam without proctoring.
{% endblocktrans %}
</p>
</button>
{% include 'proctored_exam/proctoring_opt_out_button.html' %}
{% endif %}
<p>
{% blocktrans %}
If you have questions about the status of your requirements for course credit, contact {{ platform_name }} Support.
......
......@@ -79,12 +79,13 @@
</div>
<div class="footer-sequence border-b-0 padding-b-0">
{% if not is_sample_attempt %}
<p class="proctored-exam-instruction">
{% trans "Don't want to take this exam with online proctoring?" %}<a class="proctored-decline-exam" href='#' data-action="decline" data-exam-id="{{exam_id}}" data-change-state-url="{{change_state_url}}">
{% trans "Take this exam as an open exam instead." %}
{% if not is_sample_attempt and allow_proctoring_opt_out %}
<p class="proctored-exam-instruction">
<a href="#" class="proctored-decline-exam" data-action="decline" data-exam-id="{{exam_id}}" data-change-state-url="{{change_state_url}}">
{% trans "Take this exam without proctoring." %}
</a>
</p>
{% trans "Doing so means that you are no longer eligible for academic credit." %}
</p>
{% endif %}
</div>
{% include 'proctored_exam/footer.html' %}
......
......@@ -32,17 +32,9 @@
{% endblocktrans %}
</p>
<button class="gated-sequence start-timed-exam" data-attempt-proctored=false>
<a>
{% trans "Take this exam without proctoring." %}
</a>
<i class="fa fa-arrow-circle-right"></i>
<p>
{% blocktrans %}
I am not interested in academic credit.
{% endblocktrans %}
</p>
</button>
{% if allow_proctoring_opt_out %}
{% include 'proctored_exam/proctoring_opt_out_button.html' %}
{% endif %}
</div>
{% include 'proctored_exam/confirm-decline.html' %}
{% include 'proctored_exam/footer.html' %}
{% load i18n %}
{% if allow_proctoring_opt_out %}
<button class="gated-sequence start-timed-exam" data-attempt-proctored=false>
{% trans "Take this exam without proctoring." %}
<span class="icon fa fa-arrow-circle-right" aria-hidden="true"></span>
<p>
{% blocktrans %}
I am not interested in academic credit.
{% endblocktrans %}
</p>
</button>
{% endif %}
......@@ -16,12 +16,12 @@
</strong>
{% trans "you will have "%} {{total_time|lower}} {% trans " to complete and submit the exam." %}
</p>
<button class="gated-sequence start-timed-exam" data-ajax-url="{{enter_exam_endpoint}}" data-exam-id="{{exam_id}}">
<button class="gated-sequence start-timed-exam action-primary" data-ajax-url="{{enter_exam_endpoint}}" data-exam-id="{{exam_id}}">
<a>
{% blocktrans %}
I am ready to start this timed exam.
{% endblocktrans %}
<i class="fa fa-arrow-circle-right"></i>
<span class="icon fa fa-arrow-circle-right" aria-hidden="true"></span>
</a>
</button>
</div>
......
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