mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-84555 backup: add activity_icons to the restore summary
This commit is contained in:
parent
7eab909866
commit
ae22dea084
@ -22,6 +22,9 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
use core_course\output\activity_icon;
|
||||
use core\output\local\properties\iconsize;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
global $CFG;
|
||||
@ -203,12 +206,20 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
$table->data = array();
|
||||
}
|
||||
$name = get_string('pluginname', $activity->modulename);
|
||||
$icon = new image_icon('monologo', '', $activity->modulename);
|
||||
$table->data[] = array(
|
||||
$this->output->render($icon).$name,
|
||||
$icon = activity_icon::from_modname($activity->modulename)
|
||||
->set_icon_size(iconsize::SIZE4)
|
||||
->set_colourize(false);
|
||||
|
||||
$content = $this->output->container(
|
||||
contents: $this->output->render($icon) . $name,
|
||||
classes: 'd-flex align-items-center',
|
||||
);
|
||||
|
||||
$table->data[] = [
|
||||
$content,
|
||||
format_string($activity->title),
|
||||
($activity->settings[$activitykey.'_userinfo']) ? $yestick : $notick,
|
||||
);
|
||||
];
|
||||
}
|
||||
if (!empty($table)) {
|
||||
$html .= $this->backup_detail_pair(get_string('sectionactivities', 'backup'), html_writer::table($table));
|
||||
|
Loading…
x
Reference in New Issue
Block a user