Commit 309deb06 by Chris Dodge

move turn in exm button to the timer bar

parent 5d11719a
...@@ -2,7 +2,6 @@ $(function() { ...@@ -2,7 +2,6 @@ $(function() {
var proctored_exam_view = new edx.coursware.proctored_exam.ProctoredExamView({ var proctored_exam_view = new edx.coursware.proctored_exam.ProctoredExamView({
el: $(".proctored_exam_status"), el: $(".proctored_exam_status"),
proctored_template: '#proctored-exam-status-tpl', proctored_template: '#proctored-exam-status-tpl',
controls_template: '#proctored-exam-controls-tpl',
model: new ProctoredExamModel() model: new ProctoredExamModel()
}); });
proctored_exam_view.render(); proctored_exam_view.render();
......
...@@ -11,7 +11,6 @@ var edx = edx || {}; ...@@ -11,7 +11,6 @@ var edx = edx || {};
this.$el = options.el; this.$el = options.el;
this.model = options.model; this.model = options.model;
this.templateId = options.proctored_template; this.templateId = options.proctored_template;
this.examControlsTemplateId = options.controls_template;
this.template = null; this.template = null;
this.timerId = null; this.timerId = null;
this.timerTick = 0; this.timerTick = 0;
...@@ -74,14 +73,9 @@ var edx = edx || {}; ...@@ -74,14 +73,9 @@ var edx = edx || {};
this.updateRemainingTime(this); this.updateRemainingTime(this);
this.timerId = setInterval(this.updateRemainingTime, 1000, this); this.timerId = setInterval(this.updateRemainingTime, 1000, this);
// put the exam controls (namely stop button)
// right after the sequence naviation ribbon
html = this.controls_template(this.model.toJSON());
$('.sequence-nav').after(html);
// Bind a click handler to the exam controls // Bind a click handler to the exam controls
var self = this; var self = this;
$('.proctored-exam-action-stop').click(function(){ $('.exam-button-turn-in-exam').click(function(){
$(window).unbind('beforeunload', self.unloadMessage); $(window).unbind('beforeunload', self.unloadMessage);
$.ajax({ $.ajax({
...@@ -96,7 +90,7 @@ var edx = edx || {}; ...@@ -96,7 +90,7 @@ var edx = edx || {};
} }
}); });
}); });
$('.proctored-exam-action-stop').css('cursor', 'pointer'); //$('.proctored-exam-action-stop').css('cursor', 'pointer');
} }
} }
return this; return this;
......
<div class="exam-timer">
<%- gettext("You are taking") %>
<a href="<%- interpolate(gettext('%(exam_url_path)s'), { exam_url_path: exam_url_path }, true)%>" >
<%- interpolate(gettext(' %(exam_display_name)s '), { exam_display_name: exam_display_name }, true) %>
</a>
<%- gettext(" exam as a proctored exam. Good Luck!") %>
<span id="time_remaining_id" class="pull-right">
<b>
</b>
</span>
</div>
...@@ -41,6 +41,10 @@ ...@@ -41,6 +41,10 @@
<script type="text/javascript"> <script type="text/javascript">
$('.exam-action-button').click( $('.exam-action-button').click(
function(event) { function(event) {
// cancel any warning messages to end user about leaving proctored exam
$(window).unbind('beforeunload');
var action_url = $(this).data('change-state-url'); var action_url = $(this).data('change-state-url');
var exam_id = $(this).data('exam-id'); var exam_id = $(this).data('exam-id');
var action = $(this).data('action') var action = $(this).data('action')
......
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