feat: add course unenrollment filter before unenrollment starts

This commit is contained in:
Maria Grimaldi
2022-02-16 14:25:53 -04:00
parent e9e74f941f
commit 73533f021e
4 changed files with 161 additions and 6 deletions

View File

@@ -75,6 +75,11 @@ class UnenrollView extends Backbone.View {
this.switchToSlideOne();
this.$('.reasons_survey:first .submit_reasons').click(this.switchToSlideTwo.bind(this));
}
} else if (xhr.status === 400) {
$('#unenroll_error').text(
xhr.responseText,
).stop()
.css('display', 'block');
} else if (xhr.status === 403) {
location.href = `${this.urls.signInUser}?course_id=${
encodeURIComponent($('#unenroll_course_id').val())}&enrollment_action=unenroll`;