Skip to content

Commit 80ddc79

Browse files
committed
Merge branch 'MDL-80995' of https://github.com/paulholden/moodle
2 parents e8c07e0 + 4de4e45 commit 80ddc79

File tree

2 files changed

+10
-24
lines changed

2 files changed

+10
-24
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
issueNumber: MDL-80995
2+
notes:
3+
tool_mfa:
4+
- message: >-
5+
The previously deprecated `setup_factor` renderer method has been
6+
removed
7+
type: removed

admin/tool/mfa/classes/output/renderer.php

+3-24
Original file line numberDiff line numberDiff line change
@@ -143,32 +143,11 @@ public function available_factors(): string {
143143
}
144144

145145
/**
146-
* Returns the html section for factor setup
147-
*
148-
* @param object $factor object of the factor class
149-
* @return string
150146
* @deprecated since Moodle 4.4
151-
* @todo Final deprecation in Moodle 4.8 MDL-80995
152147
*/
153-
public function setup_factor(object $factor): string {
154-
debugging('The method setup_factor() has been deprecated. The HTML derived from this method is no longer needed.
155-
Similar HTML is now achieved as part of available_factors().', DEBUG_DEVELOPER);
156-
$html = '';
157-
158-
$html .= html_writer::start_tag('div', ['class' => 'card']);
159-
160-
$html .= html_writer::tag('h4', $factor->get_display_name(), ['class' => 'card-header']);
161-
$html .= html_writer::start_tag('div', ['class' => 'card-body']);
162-
$html .= $factor->get_info();
163-
164-
$setupparams = ['action' => 'setup', 'factor' => $factor->name, 'sesskey' => sesskey()];
165-
$setupurl = new \moodle_url('action.php', $setupparams);
166-
$html .= $this->output->single_button($setupurl, $factor->get_setup_string());
167-
$html .= html_writer::end_tag('div');
168-
$html .= html_writer::end_tag('div');
169-
$html .= '<br>';
170-
171-
return $html;
148+
#[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.4', mdl: 'MDL-79920', final: true)]
149+
public function setup_factor(): void {
150+
\core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]);
172151
}
173152

174153
/**

0 commit comments

Comments
 (0)