diff --git a/enrol/authorize/config_form.php b/enrol/authorize/config_form.php
index 5df5b6b3d18..07535f5f851 100755
--- a/enrol/authorize/config_form.php
+++ b/enrol/authorize/config_form.php
@@ -158,8 +158,7 @@ if (!isset($frm->acceptechecktypes)) {
echo("");
}
elseif ($key == AN_METHOD_ECHECK) {
- $checkbox = html_writer::checkbox('enrol_authorize', AN_METHOD_ECHECK, in_array(AN_METHOD_ECHECK, $paymentmethodsenabled), get_string('method'.AN_METHOD_ECHECK));
- echo $OUTPUT->checkbox($checkbox, 'acceptmethods[]');
+ echo html_writer::checkbox('acceptmethods[]', AN_METHOD_ECHECK, in_array(AN_METHOD_ECHECK, $paymentmethodsenabled), get_string('method'.AN_METHOD_ECHECK, 'enrol_authorize'));
echo("
"); // blockquote breaks and
tags
$echecktypesenabled = get_list_of_bank_account_types();
$allechecktypes = get_list_of_bank_account_types(true);
diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php
index 38c64495bcd..8e8d114b753 100644
--- a/lib/deprecatedlib.php
+++ b/lib/deprecatedlib.php
@@ -3374,11 +3374,11 @@ function choose_from_radio ($options, $name, $checked='', $return=false) {
*/
function print_checkbox($name, $value, $checked = true, $label = '', $alt = '', $script='', $return=false) {
- // debugging('print_checkbox() has been deprecated. Please change your code to use $OUTPUT->checkbox($checkbox).');
+ // debugging('print_checkbox() has been deprecated. Please change your code to use html_writer::checkbox().');
global $OUTPUT;
if (!empty($script)) {
- debugging('The use of the $script param in print_checkbox has not been migrated into $OUTPUT->checkbox. Please use $checkbox->add_action().', DEBUG_DEVELOPER);
+ debugging('The use of the $script param in print_checkbox has not been migrated into html_writer::checkbox().', DEBUG_DEVELOPER);
}
$output = html_writer::checkbox($name, $value, $checked, $label);
diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php
index 30fb8ab6092..31ab5c3bf61 100644
--- a/lib/outputrenderers.php
+++ b/lib/outputrenderers.php
@@ -1772,43 +1772,6 @@ class core_renderer extends renderer_base {
return $this->container($this->render($button), 'closewindow');
}
- /**
- * Outputs a element. Optgroups are ignored, so do not
- * pass a html_select_optgroup as a param to this function.
- *
- * @param html_select_option $option a html_select_option
- * @return string the HTML for the
- */
- public function checkbox($option, $name='unnamed') {
- if ($option instanceof html_select_optgroup) {
- throw new coding_exception('$OUTPUT->checkbox($option) does not support a html_select_optgroup object as param.');
- } else if (!($option instanceof html_select_option)) {
- throw new coding_exception('$OUTPUT->checkbox($option) only accepts a html_select_option object as param.');
- }
- $option = clone($option);
- $option->prepare($this, $this->page, $this->target);
-
- $option->label->for = $option->id;
- $this->prepare_event_handlers($option);
-
- $output = html_writer::start_tag('span', array('class' => "checkbox $name")) . "\n";
-
- $output .= html_writer::empty_tag('input', array(
- 'type' => 'checkbox',
- 'value' => $option->value,
- 'name' => $name,
- 'id' => $option->id,
- 'alt' => $option->alt,
- 'disabled' => $option->disabled ? 'disabled' : null,
- 'class' => $option->get_classes_string(),
- 'checked' => $option->selected ? 'selected' : null));
- $output .= $this->label($option->label);
-
- $output .= html_writer::end_tag('span');
-
- return $output;
- }
-
/**
* Output an