diff --git a/course/format/tests/behat/bulk_select.feature b/course/format/tests/behat/bulk_select.feature
index 80b57b424f0..bb50810bc24 100644
--- a/course/format/tests/behat/bulk_select.feature
+++ b/course/format/tests/behat/bulk_select.feature
@@ -228,3 +228,16 @@ Feature: Bulk activity and section selection.
When I click on "Select section Section 1" "checkbox"
And I click on "Select section Section 2" "checkbox"
Then I should see "2 selected" in the "sticky-footer" "region"
+
+ Scenario: Bulk selection in small devices
+ Given I change the viewport size to "mobile"
+ And I close block drawer if open
+ When I click on "Bulk actions" "button"
+ Then I should not see "0 selected" in the "sticky-footer" "region"
+ And I should not see "Select all" in the "sticky-footer" "region"
+ And I should not see "Availability" in the "sticky-footer" "region"
+ And I should not see "Duplicate" in the "sticky-footer" "region"
+ And I should not see "Move" in the "sticky-footer" "region"
+ And I should not see "Delete" in the "sticky-footer" "region"
+ And I click on "Close bulk actions" "button" in the "sticky-footer" "region"
+ And "sticky-footer" "region" should not be visible
diff --git a/theme/boost/scss/moodle/course.scss b/theme/boost/scss/moodle/course.scss
index 3ce47eab753..8451484ecc3 100644
--- a/theme/boost/scss/moodle/course.scss
+++ b/theme/boost/scss/moodle/course.scss
@@ -1651,6 +1651,26 @@ $divider-hover-color: $primary !default;
}
}
+// Custom styles for bulk actions sticky footer in small devices.
+.sticky-footer-content.bulkactions {
+ @include media-breakpoint-down(sm) {
+ position: relative;
+ .form-check,
+ .bulkaction-name,
+ .bulkcount {
+ display: none;
+ }
+ .actions button {
+ padding: 0 map-get($spacers, 2);
+ }
+ .bulkcancel {
+ position: absolute;
+ top: 0;
+ right: 0;
+ }
+ }
+}
+
/* Activity completion */
.defaultactivitycompletion-item {
diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css
index 6d9bc7ec47b..c4a0d0f28df 100644
--- a/theme/boost/style/moodle.css
+++ b/theme/boost/style/moodle.css
@@ -29810,6 +29810,25 @@ span.editinstructions .alert-link {
}
}
+@media (max-width: 767.98px) {
+ .sticky-footer-content.bulkactions {
+ position: relative;
+ }
+ .sticky-footer-content.bulkactions .form-check,
+ .sticky-footer-content.bulkactions .bulkaction-name,
+ .sticky-footer-content.bulkactions .bulkcount {
+ display: none;
+ }
+ .sticky-footer-content.bulkactions .actions button {
+ padding: 0 0.5rem;
+ }
+ .sticky-footer-content.bulkactions .bulkcancel {
+ position: absolute;
+ top: 0;
+ right: 0;
+ }
+}
+
/* Activity completion */
.defaultactivitycompletion-item a {
color: #000;
diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css
index 7a5c2c9068b..dfd6ff997e0 100644
--- a/theme/classic/style/moodle.css
+++ b/theme/classic/style/moodle.css
@@ -29810,6 +29810,25 @@ span.editinstructions .alert-link {
}
}
+@media (max-width: 767.98px) {
+ .sticky-footer-content.bulkactions {
+ position: relative;
+ }
+ .sticky-footer-content.bulkactions .form-check,
+ .sticky-footer-content.bulkactions .bulkaction-name,
+ .sticky-footer-content.bulkactions .bulkcount {
+ display: none;
+ }
+ .sticky-footer-content.bulkactions .actions button {
+ padding: 0 0.5rem;
+ }
+ .sticky-footer-content.bulkactions .bulkcancel {
+ position: absolute;
+ top: 0;
+ right: 0;
+ }
+}
+
/* Activity completion */
.defaultactivitycompletion-item a {
color: #000;