diff --git a/cms/static/js/spec/views/pages/course_outline_spec.js b/cms/static/js/spec/views/pages/course_outline_spec.js index 1c3a3000d088..327e5ec21d0b 100644 --- a/cms/static/js/spec/views/pages/course_outline_spec.js +++ b/cms/static/js/spec/views/pages/course_outline_spec.js @@ -2291,13 +2291,6 @@ describe('CourseOutlinePage', function() { it('shows validation error on relative date', function() { outlinePage.$('.outline-subsection .configure-button').click(); - // when due number of weeks goes over 18 - selectRelativeWeeksSubsection('19'); - expect($('#relative_weeks_due_warning_max').css('display')).not.toBe('none'); - expect($('#relative_weeks_due_warning_max')).toContainText('The maximum number of weeks this subsection can be due in is 18 weeks from the learner enrollment date.'); - expect($('.wrapper-modal-window .action-save').prop('disabled')).toBe(true); - expect($('.wrapper-modal-window .action-save').hasClass('is-disabled')).toBe(true); - // when due number of weeks is less than 1 selectRelativeWeeksSubsection('-1'); expect($('#relative_weeks_due_warning_min').css('display')).not.toBe('none'); @@ -2306,8 +2299,7 @@ describe('CourseOutlinePage', function() { expect($('.wrapper-modal-window .action-save').hasClass('is-disabled')).toBe(true); // when no validation error should show up - selectRelativeWeeksSubsection('10'); - expect($('#relative_weeks_due_warning_max').css('display')).toBe('none'); + selectRelativeWeeksSubsection('19'); expect($('#relative_weeks_due_warning_min').css('display')).toBe('none'); expect($('.wrapper-modal-window .action-save').prop('disabled')).toBe(false); expect($('.wrapper-modal-window .action-save').hasClass('is-disabled')).toBe(false); diff --git a/cms/static/js/views/modals/course_outline_modals.js b/cms/static/js/views/modals/course_outline_modals.js index fa8c3239dc2e..aefb13d286ec 100644 --- a/cms/static/js/views/modals/course_outline_modals.js +++ b/cms/static/js/views/modals/course_outline_modals.js @@ -420,14 +420,10 @@ define(['jquery', 'backbone', 'underscore', 'gettext', 'js/views/baseview', validateDueIn: function() { this.$('#relative_weeks_due_projected').hide(); - if (this.getValue() > 18){ - this.$('#relative_weeks_due_warning_max').show(); - BaseModal.prototype.disableActionButton.call(this.parent, 'save'); - } else if (this.getValue() < 1){ - this.$('#relative_weeks_due_warning_min').show() + if (this.getValue() < 1) { + this.$('#relative_weeks_due_warning_min').show(); BaseModal.prototype.disableActionButton.call(this.parent, 'save'); } else { - this.$('#relative_weeks_due_warning_max').hide(); this.$('#relative_weeks_due_warning_min').hide(); this.showProjectedDate(); BaseModal.prototype.enableActionButton.call(this.parent, 'save'); @@ -452,7 +448,7 @@ define(['jquery', 'backbone', 'underscore', 'gettext', 'js/views/baseview', // Grab all the subsections, map them to their block_ids, then return as an Array var subsectionIds = $('.outline-subsection').map(function(){ return this.id; }).get() var relative_weeks_due = null; - if (this.getValue() < 19 && this.getValue() > 0 && $('#grading_type').val() !== 'notgraded') { + if (this.getValue() > 0 && $('#grading_type').val() !== 'notgraded') { relative_weeks_due = this.getValue() } window.analytics.track('edx.bi.studio.relative_date.saved', { diff --git a/cms/templates/js/self-paced-due-date-editor.underscore b/cms/templates/js/self-paced-due-date-editor.underscore index ceaf5e6873ce..086471aa4ba6 100644 --- a/cms/templates/js/self-paced-due-date-editor.underscore +++ b/cms/templates/js/self-paced-due-date-editor.underscore @@ -4,7 +4,7 @@ + placeholder="" autocomplete="off" min="1" style="width:20%"/> <%- gettext('weeks from learner enrollment date')%> @@ -19,10 +19,6 @@ %> -
- <%- gettext('The maximum number of weeks this subsection can be due in is 18 weeks from the learner enrollment date.') %> -
-
<%- gettext('The minimum number of weeks this subsection can be due in is 1 week from the learner enrollment date.') %>