diff --git a/blocks/timeline/templates/event-list-item.mustache b/blocks/timeline/templates/event-list-item.mustache index a28588cd102..7c442c13075 100644 --- a/blocks/timeline/templates/event-list-item.mustache +++ b/blocks/timeline/templates/event-list-item.mustache @@ -79,7 +79,7 @@ {{activitystr}} {{/courseview}} {{^courseview}} - {{#course.fullnamedisplay}}{{{course.fullnamedisplay}}} · {{/course.fullnamedisplay}}{{activitystr}} + {{activitystr}}{{#course.fullnamedisplay}} · {{{course.fullnamedisplay}}}{{/course.fullnamedisplay}} {{/courseview}} diff --git a/blocks/timeline/tests/behat/block_timeline_dates.feature b/blocks/timeline/tests/behat/block_timeline_dates.feature index 234764be6a5..681fd1aad06 100644 --- a/blocks/timeline/tests/behat/block_timeline_dates.feature +++ b/blocks/timeline/tests/behat/block_timeline_dates.feature @@ -39,23 +39,23 @@ Feature: The timeline block allows users to see upcoming activities And I click on "Filter timeline by date" "button" in the "Timeline" "block" When I click on "Next 7 days" "link" in the "Timeline" "block" Then "Test choice 1" "link" should exist in the "Timeline" "block" - And I should see "Course 2 · Choice closes" in the "Timeline" "block" + And I should see "Choice closes · Course 2" in the "Timeline" "block" And "Test feedback 1" "link" should exist in the "Timeline" "block" - And I should see "Course 2 · Feedback closes" in the "Timeline" "block" + And I should see "Feedback closes · Course 2" in the "Timeline" "block" And "Test assign 2" "link" should exist in the "Timeline" "block" And "Test feedback 4" "link" should exist in the "Timeline" "block" And "Test choice 2" "link" should not exist in the "Timeline" "block" And "Test choice 3" "link" should not exist in the "Timeline" "block" And "Test feedback 3" "link" should not exist in the "Timeline" "block" And "Test assign 1" "link" should not exist in the "Timeline" "block" - And I should not see "Course 1 · Assignment is due" in the "Timeline" "block" + And I should not see "Assignment is due · Course 1" in the "Timeline" "block" Scenario: Overdue in date view Given I log in as "student1" And I click on "Filter timeline by date" "button" in the "Timeline" "block" When I click on "Overdue" "link" in the "Timeline" "block" Then "Test assign 1" "link" should exist in the "Timeline" "block" - And I should see "Course 1 · Assignment is due" in the "Timeline" "block" + And I should see "Assignment is due · Course 1" in the "Timeline" "block" And "Test assign 2" "link" should exist in the "Timeline" "block" And "Test choice 2" "link" should not exist in the "Timeline" "block" And "Test feedback 1" "link" should not exist in the "Timeline" "block" @@ -69,20 +69,20 @@ Feature: The timeline block allows users to see upcoming activities And I click on "Filter timeline by date" "button" in the "Timeline" "block" When I click on "All" "link" in the "Timeline" "block" Then "Test assign 1" "link" should exist in the "Timeline" "block" - And I should see "Course 1 · Assignment is due" in the "Timeline" "block" + And I should see "Assignment is due · Course 1" in the "Timeline" "block" And "Test assign 2" "link" should exist in the "Timeline" "block" - And I should see "Course 2 · Assignment is due" in the "Timeline" "block" + And I should see "Assignment is due · Course 2" in the "Timeline" "block" And "Test feedback 1" "link" should exist in the "Timeline" "block" - And I should see "Course 2 · Feedback closes" in the "Timeline" "block" + And I should see "Feedback closes · Course 2" in the "Timeline" "block" And "Test choice 1" "link" should exist in the "Timeline" "block" - And I should see "Course 2 · Choice closes" in the "Timeline" "block" + And I should see "Choice closes · Course 2" in the "Timeline" "block" And "Test feedback 4" "link" should exist in the "Timeline" "block" - And I should see "Course 2 · Feedback closes" in the "Timeline" "block" + And I should see "Feedback closes · Course 2" in the "Timeline" "block" And "Test choice 2" "link" should not exist in the "Timeline" "block" And "Test feedback 2" "link" should not exist in the "Timeline" "block" And I click on "Show more activities" "button" And "Test feedback 2" "link" should exist in the "Timeline" "block" - And I should see "Course 1 · Feedback closes" in the "Timeline" "block" + And I should see "Feedback closes · Course 1" in the "Timeline" "block" And "Test choice 3" "link" should exist in the "Timeline" "block" And I should see "Test assign 1" in the "Timeline" "block" And I should see "Test feedback 1" in the "Timeline" "block" @@ -97,20 +97,20 @@ Feature: The timeline block allows users to see upcoming activities When I click on "All" "link" in the "Timeline" "block" And I reload the page Then "Test assign 1" "link" should exist in the "Timeline" "block" - And I should see "Course 1 · Assignment is due" in the "Timeline" "block" + And I should see "Assignment is due · Course 1" in the "Timeline" "block" And "Test assign 2" "link" should exist in the "Timeline" "block" - And I should see "Course 2 · Assignment is due" in the "Timeline" "block" + And I should see "Assignment is due · Course 2" in the "Timeline" "block" And "Test feedback 1" "link" should exist in the "Timeline" "block" - And I should see "Course 2 · Feedback closes" in the "Timeline" "block" + And I should see "Feedback closes · Course 2" in the "Timeline" "block" And "Test choice 1" "link" should exist in the "Timeline" "block" - And I should see "Course 2 · Choice closes" in the "Timeline" "block" + And I should see "Choice closes · Course 2" in the "Timeline" "block" And "Test feedback 4" "link" should exist in the "Timeline" "block" - And I should see "Course 2 · Feedback closes" in the "Timeline" "block" + And I should see "Feedback closes · Course 2" in the "Timeline" "block" And I should not see "Test choice 2" in the "Timeline" "block" And I should not see "Test feedback 2" in the "Timeline" "block" And I click on "Show more activities" "button" And "Test feedback 2" "link" should exist in the "Timeline" "block" - And I should see "Course 1 · Feedback closes" in the "Timeline" "block" + And I should see "Feedback closes · Course 1" in the "Timeline" "block" And I should see "Test assign 1" in the "Timeline" "block" And I should see "Test feedback 1" in the "Timeline" "block" And I should see "Test feedback 3" in the "Timeline" "block" @@ -124,9 +124,9 @@ Feature: The timeline block allows users to see upcoming activities When I click on "Overdue" "link" in the "Timeline" "block" And I reload the page Then "Test assign 1" "link" should exist in the "Timeline" "block" - And I should see "Course 1 · Assignment is due" in the "Timeline" "block" + And I should see "Assignment is due · Course 1" in the "Timeline" "block" And "Test assign 2" "link" should exist in the "Timeline" "block" - And I should see "Course 2 · Assignment is due" in the "Timeline" "block" + And I should see "Assignment is due · Course 2" in the "Timeline" "block" And "Test feedback 1" "link" should not exist in the "Timeline" "block" And "Test feedback 3" "link" should not exist in the "Timeline" "block" And "Test feedback 4" "link" should not exist in the "Timeline" "block" diff --git a/theme/boost/scss/moodle/calendar.scss b/theme/boost/scss/moodle/calendar.scss index 84bfb8e3697..93ac8e92005 100644 --- a/theme/boost/scss/moodle/calendar.scss +++ b/theme/boost/scss/moodle/calendar.scss @@ -736,4 +736,5 @@ table.calendartable caption { .cal_courses_flt { color: $gray-600; + max-width: 75%; } diff --git a/theme/boost/scss/moodle/core.scss b/theme/boost/scss/moodle/core.scss index e823c533314..4a512c79377 100644 --- a/theme/boost/scss/moodle/core.scss +++ b/theme/boost/scss/moodle/core.scss @@ -2577,6 +2577,7 @@ input[disabled] { .custom-select { width: auto; + max-width: 100%; } .fade.in { @@ -3030,3 +3031,18 @@ blockquote { color: $gray-700; border-left: 5px solid $gray-400; } + +/** Prevent long strings exceeding page width */ +.page-header-headings, +.coursename, +.categoryname, +.breadcrumb-item, +.dropdown-item { + + &:not(.text-truncate) { + word-break: normal; + overflow-wrap: anywhere; + white-space: normal; + } + +} diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index c7a185e3eb8..890bda04121 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -11943,7 +11943,8 @@ input[disabled] { cursor: not-allowed; } .custom-select { - width: auto; } + width: auto; + max-width: 100%; } .fade.in { opacity: 1; } @@ -12327,6 +12328,16 @@ blockquote { color: #495057; border-left: 5px solid #ced4da; } +/** Prevent long strings exceeding page width */ +.page-header-headings:not(.text-truncate), +.coursename:not(.text-truncate), +.categoryname:not(.text-truncate), +.breadcrumb-item:not(.text-truncate), +.dropdown-item:not(.text-truncate) { + word-break: normal; + overflow-wrap: anywhere; + white-space: normal; } + .icon { font-size: 16px; width: 16px; @@ -13721,7 +13732,8 @@ table.calendartable caption { margin: 0; } .cal_courses_flt { - color: #6a737b; } + color: #6a737b; + max-width: 75%; } .content-bank-container .cb-content-wrapper { padding: 0.5rem; diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 1a3d521f884..3644c64f060 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -11943,7 +11943,8 @@ input[disabled] { cursor: not-allowed; } .custom-select { - width: auto; } + width: auto; + max-width: 100%; } .fade.in { opacity: 1; } @@ -12327,6 +12328,16 @@ blockquote { color: #495057; border-left: 5px solid #ced4da; } +/** Prevent long strings exceeding page width */ +.page-header-headings:not(.text-truncate), +.coursename:not(.text-truncate), +.categoryname:not(.text-truncate), +.breadcrumb-item:not(.text-truncate), +.dropdown-item:not(.text-truncate) { + word-break: normal; + overflow-wrap: anywhere; + white-space: normal; } + .icon { font-size: 16px; width: 16px; @@ -13721,7 +13732,8 @@ table.calendartable caption { margin: 0; } .cal_courses_flt { - color: #6a737b; } + color: #6a737b; + max-width: 75%; } .content-bank-container .cb-content-wrapper { padding: 0.5rem;