diff --git a/cms/static/js/views/modals/course_outline_modals.js b/cms/static/js/views/modals/course_outline_modals.js index db36f88410de..ebc396f50a1b 100644 --- a/cms/static/js/views/modals/course_outline_modals.js +++ b/cms/static/js/views/modals/course_outline_modals.js @@ -1064,12 +1064,20 @@ define(['jquery', 'backbone', 'underscore', 'gettext', 'js/views/baseview', if (this.currentVisibility() === 'staff_only') { metadata.visible_to_staff_only = true; metadata.hide_after_due = null; + metadata.hide_from_toc = null; } else if (this.currentVisibility() === 'hide_after_due') { metadata.visible_to_staff_only = null; metadata.hide_after_due = true; - } else { + metadata.hide_from_toc = null; + } else if (this.currentVisibility() === 'hide_from_toc'){ + metadata.visible_to_staff_only = null; + metadata.hide_after_due = null; + metadata.hide_from_toc = true; + } + else { metadata.visible_to_staff_only = null; metadata.hide_after_due = null; + metadata.hide_from_toc = null; } return { diff --git a/cms/static/sass/elements/_modules.scss b/cms/static/sass/elements/_modules.scss index 9e681c6e1852..29a2989c1ae9 100644 --- a/cms/static/sass/elements/_modules.scss +++ b/cms/static/sass/elements/_modules.scss @@ -507,17 +507,17 @@ $outline-indent-width: $baseline; } } - // CASE: is hidden from TOC - &.is-hidden-from-toc { - // needed to make sure direct children only - > .section-status, - > .subsection-status, - > .unit-status { - .status-message .icon { - color: $color-hide-from-toc; - } + // CASE: is hidden from TOC + &.is-hidden-from-toc { + // needed to make sure direct children only + > .section-status, + > .subsection-status, + > .unit-status { + .status-message .icon { + color: $color-hide-from-toc; } } + } // CASE: has gated content &.is-gated { @@ -615,6 +615,11 @@ $outline-indent-width: $baseline; border-left-color: $color-staff-only; } + // CASE: is hidden from TOC + &.is-hidden-from-toc { + border-left-color: $color-hide-from-toc; + } + // CASE: has gated content &.is-gated { border-left-color: $color-gated; @@ -711,7 +716,7 @@ $outline-indent-width: $baseline; } // CASE: is hidden from TOC - &.is-staff-only { + &.is-hidden-from-toc { border-left-color: $color-hide-from-toc; } diff --git a/xmodule/modulestore/inheritance.py b/xmodule/modulestore/inheritance.py index 489365e80e0d..4c5a14b769cb 100644 --- a/xmodule/modulestore/inheritance.py +++ b/xmodule/modulestore/inheritance.py @@ -240,6 +240,13 @@ class InheritanceMixin(XBlockMixin): scope=Scope.settings ) + hide_from_toc = Boolean( + display_name=_("Hide from Table of Contents"), + help=_("Enter true or false. If true, this block will be hidden from the Table of Contents."), + default=False, + scope=Scope.settings + ) + @property def close_date(self): """