Skip to content

Commit

Permalink
Merge pull request #820 from edx/bseverino/remove-exam-resume-flag
Browse files Browse the repository at this point in the history
[MST-678] Roll out exam resume and grouped attempt features
  • Loading branch information
bseverino authored Mar 31, 2021
2 parents 3aaff00 + f4e1dd8 commit 7af2db0
Show file tree
Hide file tree
Showing 12 changed files with 168 additions and 685 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Change Log
Unreleased
~~~~~~~~~~

[3.8.0] - 2021-03-31
~~~~~~~~~~~~~~~~~~~~~
* Remove exam resume waffle flag references and fully roll out exam resume and grouped attempt features.

[3.7.16] - 2021-03-30
~~~~~~~~~~~~~~~~~~~~~
* Reduce time for ping interval from 120 to 30 seconds.
Expand Down
2 changes: 1 addition & 1 deletion edx_proctoring/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"""

# Be sure to update the version number in edx_proctoring/package.json
__version__ = '3.7.16'
__version__ = '3.8.0'

default_app_config = 'edx_proctoring.apps.EdxProctoringConfig' # pylint: disable=invalid-name
1 change: 0 additions & 1 deletion edx_proctoring/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def plugin_settings(settings):
'proctoring/js/models/proctored_exam_model.js',
'proctoring/js/models/learner_onboarding_model.js',
'proctoring/js/collections/proctored_exam_allowance_collection.js',
'proctoring/js/collections/proctored_exam_attempt_collection.js',
'proctoring/js/collections/proctored_exam_attempt_grouped_collection.js',
'proctoring/js/collections/proctored_exam_onboarding_collection.js',
'proctoring/js/collections/proctored_exam_collection.js',
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,12 @@ edx = edx || {};
edx.instructor_dashboard.proctoring.ProctoredExamAttemptView = Backbone.View.extend({
initialize: function() {
this.setElement($('.student-proctored-exam-container'));
this.enable_exam_resume_proctoring_improvements =
this.$el.data('enable-exam-resume-proctoring-improvements');
this.enable_exam_resume_proctoring_improvements = this.enable_exam_resume_proctoring_improvements &&
this.enable_exam_resume_proctoring_improvements.toLowerCase() === 'true';
this.course_id = this.$el.data('course-id');
this.template = null;
this.model = new edx.instructor_dashboard.proctoring.ProctoredExamAttemptModel();

if (!this.enable_exam_resume_proctoring_improvements) {
this.collection = new edx.instructor_dashboard.proctoring.ProctoredExamAttemptCollection();
this.template_url = '/static/proctoring/templates/student-proctored-exam-attempts.underscore';
} else {
this.collection = new edx.instructor_dashboard.proctoring.ProctoredExamAttemptGroupedCollection();
this.template_url = '/static/proctoring/templates/student-proctored-exam-attempts-grouped.underscore';
}
this.collection = new edx.instructor_dashboard.proctoring.ProctoredExamAttemptGroupedCollection();
this.template_url = '/static/proctoring/templates/student-proctored-exam-attempts-grouped.underscore';


this.initial_url = this.collection.url;
Expand Down Expand Up @@ -232,35 +223,21 @@ edx = edx || {};

self.model.url = this.attempt_url + attemptId;

if (!self.enable_exam_resume_proctoring_improvements) {
self.model.fetch({
headers: {
'X-CSRFToken': this.getCSRFToken()
},
type: 'DELETE',
success: function() {
// fetch the attempts again.
self.hydrate();
$('body').css('cursor', 'auto');
}
});
} else {
// call reset endpoint that can be used to delete all attempts for a given
// user and exam
$.ajax({
url: '/api/edx_proctoring/v1/proctored_exam/exam_id/' + examId +
'/user_id/' + userId + '/reset_attempts',
type: 'DELETE',
headers: {
'X-CSRFToken': this.getCSRFToken()
},
success: function() {
// fetch the attempts again.
self.hydrate();
$('body').css('cursor', 'auto');
}
});
}
// call reset endpoint that can be used to delete all attempts for a given
// user and exam
$.ajax({
url: '/api/edx_proctoring/v1/proctored_exam/exam_id/' + examId +
'/user_id/' + userId + '/reset_attempts',
type: 'DELETE',
headers: {
'X-CSRFToken': this.getCSRFToken()
},
success: function() {
// fetch the attempts again.
self.hydrate();
$('body').css('cursor', 'auto');
}
});
},
onResumeAttempt: function(event) {
var $target, attemptId, userId;
Expand Down
Loading

0 comments on commit 7af2db0

Please sign in to comment.