MDL-78711 course: Final deprecation of edit_default_completion()
Signed-off-by: Daniel Ziegenberg <[email protected]>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
issueNumber: MDL-78711
|
||||
notes:
|
||||
core_course:
|
||||
- message: Final deprecation of edit_default_completion()
|
||||
type: removed
|
||||
@@ -117,28 +117,11 @@ class core_course_bulk_activity_completion_renderer extends plugin_renderer_base
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the form for editing default completion
|
||||
*
|
||||
* @param moodleform $form
|
||||
* @param array $modules
|
||||
* @return string
|
||||
* @deprecated since Moodle 4.3 MDL-78528
|
||||
* @todo MDL-78711 This will be deleted in Moodle 4.7
|
||||
*/
|
||||
public function edit_default_completion($form, $modules) {
|
||||
debugging('edit_default_completion() is deprecated and will be removed.', DEBUG_DEVELOPER);
|
||||
|
||||
ob_start();
|
||||
$form->display();
|
||||
$formhtml = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$data = (object)[
|
||||
'form' => $formhtml,
|
||||
'modules' => array_values($modules),
|
||||
'modulescount' => count($modules),
|
||||
];
|
||||
return parent::render_from_template('core_course/editdefaultcompletion', $data);
|
||||
#[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-78528', final: true)]
|
||||
public function edit_default_completion() {
|
||||
\core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template core_course/editdefaultcompletion
|
||||
|
||||
Edit default module completion screen
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"form": "<form><p>Placeholder for the form</p></form>",
|
||||
"modulescount": 1,
|
||||
"modules": [{
|
||||
"id": "10",
|
||||
"formattedname": "Assignment",
|
||||
"icon": "https://raw.githubusercontent.com/moodle/moodle/master/mod/assign/pix/monologo.svg"
|
||||
}]
|
||||
}
|
||||
}}
|
||||
<p>{{#str}}modifybulkactions, completion{{/str}}</p>
|
||||
{{{form}}}
|
||||
<p>{{#str}}affectedactivities, completion, {{modulescount}}{{/str}}</p>
|
||||
<div class="container-fluid">
|
||||
<div class="modules mb-1">
|
||||
<div class="row mb-1">
|
||||
{{#modules}}
|
||||
<div class="col-sm-2">
|
||||
<img src="{{icon}}" class="me-1 mb-1" alt="">
|
||||
<span>{{{formattedname}}}</span>
|
||||
</div>
|
||||
{{/modules}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user