From bc00ad1f2744f132a9ff25b4a0fa0a51ba104f2f Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Mon, 18 Dec 2023 17:36:08 -0400 Subject: [PATCH] feat: add message depending on type of xblock --- cms/templates/js/course-outline.underscore | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cms/templates/js/course-outline.underscore b/cms/templates/js/course-outline.underscore index 4d63e31efb4c..98f567fe4353 100644 --- a/cms/templates/js/course-outline.underscore +++ b/cms/templates/js/course-outline.underscore @@ -51,9 +51,13 @@ if (staffOnlyMessage) { messageType = 'staff-only'; messageText = gettext('Contains staff only content'); addStatusMessage(messageType, messageText); -} else if (hideFromTOCMessage){ +} else if (hideFromTOCMessage && !xblockInfo.isVertical()){ + if (xblockInfo.isChapter()) { + messageText = gettext('Hidden in the course outline, but sections are accessible for your learners through their separate link.'); + } else { + messageText = gettext('Subsections are not navigable between each other, they can only be accessed through their link.'); + } messageType = 'hide-from-toc'; - messageText = gettext('Hidden in the course outline, but subsections are accessible for your learners through their separate link.'); addStatusMessage(messageType, messageText); } else { if (visibilityState === 'needs_attention' && xblockInfo.isVertical()) {