mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
MDL-61637 tool_dataprivacy: Point to new blocks API function
This commit is contained in:
parent
c459409c1b
commit
868fc2aba1
1 changed files with 2 additions and 8 deletions
|
@ -319,14 +319,8 @@ class data_registry_page implements renderable, templatable {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (function_exists('block_instance_by_id')) {
|
$blockinstance = block_instance_by_id($childcontext->instanceid);
|
||||||
$blockinstance = block_instance_by_id($childcontext->instanceid);
|
$displayname = shorten_text(format_string($blockinstance->get_title(), true, ['context' => $childcontext]));
|
||||||
} else {
|
|
||||||
// TODO To be removed when MDL-61621 gets integrated.
|
|
||||||
$blockinstance = $DB->get_record('block_instances', ['id' => $childcontext->instanceid]);
|
|
||||||
$blockinstance = block_instance($blockinstance->blockname, $blockinstance);
|
|
||||||
}
|
|
||||||
$displayname = shorten_text(format_string($blockinstance->get_title(), true, ['context' => $childcontext->id]));
|
|
||||||
$branches[] = self::complete([
|
$branches[] = self::complete([
|
||||||
'text' => $displayname,
|
'text' => $displayname,
|
||||||
'contextid' => $childcontext->id,
|
'contextid' => $childcontext->id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue