From 588881a98f91d23efbeee6a2ccbf2c1b0559e1e6 Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Wed, 9 Jun 2021 18:43:54 +0200 Subject: [PATCH] fix: Handle None in course breadcrumbs Under some circumstances sequence_title might be None, which causes the breadcrumbs to display "None". This ensures that doesn't happen and avoids stray breadcrumb separators. --- lms/templates/courseware/courseware.html | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lms/templates/courseware/courseware.html b/lms/templates/courseware/courseware.html index 2e53b5611aec..9737682f9ca8 100644 --- a/lms/templates/courseware/courseware.html +++ b/lms/templates/courseware/courseware.html @@ -181,21 +181,29 @@ ${course_home_page_title(course)} - + % if chapter or section or sequence_title: + + % endif % endif % if chapter: ${chapter.display_name_with_default} - + % if section or sequence_title: + + % endif % endif % if section: ${section.display_name_with_default} - + % if sequence_title: + + % endif + % endif + % if sequence_title: + ${sequence_title} % endif - ${sequence_title}