Commit c12227df by Andy Armstrong

Allow authors to remove option for unproctored exams

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