Commit bb218861 by chrisndodge

Merge pull request #70 from edx/cdodge/turn-in-exam

move turn in exm button to the timer bar
parents 5d11719a 309deb06
......@@ -2,7 +2,6 @@ $(function() {
var proctored_exam_view = new edx.coursware.proctored_exam.ProctoredExamView({
el: $(".proctored_exam_status"),
proctored_template: '#proctored-exam-status-tpl',
controls_template: '#proctored-exam-controls-tpl',
model: new ProctoredExamModel()
});
proctored_exam_view.render();
......
......@@ -11,7 +11,6 @@ var edx = edx || {};
this.$el = options.el;
this.model = options.model;
this.templateId = options.proctored_template;
this.examControlsTemplateId = options.controls_template;
this.template = null;
this.timerId = null;
this.timerTick = 0;
......@@ -74,14 +73,9 @@ var edx = edx || {};
this.updateRemainingTime(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
var self = this;
$('.proctored-exam-action-stop').click(function(){
$('.exam-button-turn-in-exam').click(function(){
$(window).unbind('beforeunload', self.unloadMessage);
$.ajax({
......@@ -96,7 +90,7 @@ var edx = edx || {};
}
});
});
$('.proctored-exam-action-stop').css('cursor', 'pointer');
//$('.proctored-exam-action-stop').css('cursor', 'pointer');
}
}
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 @@
<script type="text/javascript">
$('.exam-action-button').click(
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 exam_id = $(this).data('exam-id');
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