Skip to content

Commit

Permalink
feat: add message depending on type of xblock
Browse files Browse the repository at this point in the history
  • Loading branch information
mariajgrimaldi committed Dec 18, 2023
1 parent aa347d8 commit bc00ad1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cms/templates/js/course-outline.underscore
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit bc00ad1

Please sign in to comment.