diff --git a/lib/classes/output/checkbox_toggleall.php b/lib/classes/output/checkbox_toggleall.php
index be81f80be91..5a900b89101 100644
--- a/lib/classes/output/checkbox_toggleall.php
+++ b/lib/classes/output/checkbox_toggleall.php
@@ -60,7 +60,9 @@ class checkbox_toggleall implements renderable, templatable {
*
* id string - The element ID.
* name string - The element name.
- * classes string - CSS classes that you want to add for your checkbox.
+ * classes string - CSS classes that you want to add for your checkbox or toggle controls.
+ * For button type master toggle controls, this could be any Bootstrap 4 btn classes
+ * that you might want to add. Defaults to "btn-secondary".
* value string|int - The element's value.
* checked boolean - Whether to render this initially as checked.
* label string - The label for the checkbox element.
diff --git a/lib/templates/checkbox-toggleall-master-button.mustache b/lib/templates/checkbox-toggleall-master-button.mustache
index 4648b4303c4..7ebc0d0fac2 100644
--- a/lib/templates/checkbox-toggleall-master-button.mustache
+++ b/lib/templates/checkbox-toggleall-master-button.mustache
@@ -31,12 +31,12 @@
"togglegroup": "toggle-group",
"label": "Select everything!",
"checked": true,
- "classes": "p-1",
+ "classes": "btn-primary btn-lg",
"selectall": "Select all",
"deselectall": "Deselect all"
}
}}
- $selectallid,
'value' => 1,
'label' => get_string('selectall'),
- 'classes' => 'mr-1'
+ 'classes' => 'btn-secondary mr-1'
], true);
$actiondata .= $OUTPUT->render($selectallcheckbox);
diff --git a/mod/data/lib.php b/mod/data/lib.php
index d1405936663..bd562c91dfa 100644
--- a/mod/data/lib.php
+++ b/mod/data/lib.php
@@ -1444,7 +1444,7 @@ function data_print_template($template, $records, $data, $search='', $page=0, $r
$checkbox = new \core\output\checkbox_toggleall('listview-entries', false, [
'id' => "entry_{$record->id}",
'name' => 'delcheck[]',
- 'class' => 'recordcheckbox',
+ 'classes' => 'recordcheckbox',
'value' => $record->id,
]);
$replacement[] = $OUTPUT->render($checkbox);
diff --git a/mod/data/view.php b/mod/data/view.php
index 0812fb80233..5f7800e1cef 100644
--- a/mod/data/view.php
+++ b/mod/data/view.php
@@ -516,7 +516,7 @@ if ($showactivity) {
'name' => $selectallid,
'value' => 1,
'label' => get_string('selectall'),
- 'classes' => 'mr-1',
+ 'classes' => 'btn-secondary mr-1',
], true);
echo $OUTPUT->render($mastercheckbox);
diff --git a/mod/feedback/show_nonrespondents.php b/mod/feedback/show_nonrespondents.php
index fb20199168f..8aa381da1fd 100644
--- a/mod/feedback/show_nonrespondents.php
+++ b/mod/feedback/show_nonrespondents.php
@@ -267,7 +267,7 @@ if (empty($students)) {
$checkbox = new \core\output\checkbox_toggleall('feedback-non-respondents', false, [
'id' => 'messageuser-' . $student->id,
'name' => 'messageuser[]',
- 'class' => 'mr-1',
+ 'classes' => 'mr-1',
'value' => $student->id,
'label' => get_string('includeuserinrecipientslist', 'mod_feedback', fullname($student)),
'labelclasses' => 'accesshide',