Don't want to take this exam with online proctoring? <ahref="#">Take this exam as an open exam instead.</a>
{% endblocktrans %}
{% trans "Don't want to take this exam with online proctoring?" %}<aclass="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." %}
</a>
</p>
</div>
{% include 'proctoring/seq_proctored_exam_footer.html' %}
...
...
@@ -50,6 +50,27 @@
var_waiting_for_proctored_interval=null;
$('.proctored-decline-exam').click(
function(event){
varaction_url=$(this).data('change-state-url');
varexam_id=$(this).data('exam-id');
varaction=$(this).data('action')
// Update the state of the attempt
$.ajax({
url:action_url,
type:'PUT',
data:{
action:action
},
success:function(){
// Reloading page will reflect the new state of the attempt