mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
Merge branch 'MDL-81163-main' of https://github.com/sarjona/moodle into main
This commit is contained in:
commit
97a5b89317
@ -132,8 +132,7 @@ class content_item_readonly_repository implements content_item_readonly_reposito
|
||||
$help = $this->get_core_module_help_string($mod->name);
|
||||
$archetype = plugin_supports('mod', $mod->name, FEATURE_MOD_ARCHETYPE, MOD_ARCHETYPE_OTHER);
|
||||
$purpose = plugin_supports('mod', $mod->name, FEATURE_MOD_PURPOSE, MOD_PURPOSE_OTHER);
|
||||
$isbrandedfunction = $mod->name.'_is_branded';
|
||||
$isbranded = function_exists($isbrandedfunction) ? $isbrandedfunction() : false;
|
||||
$isbranded = component_callback('mod_' . $mod->name, 'is_branded', [], false);
|
||||
|
||||
$contentitem = new content_item(
|
||||
$mod->id,
|
||||
@ -197,8 +196,7 @@ class content_item_readonly_repository implements content_item_readonly_reposito
|
||||
$help = $this->get_core_module_help_string($mod->name);
|
||||
$archetype = plugin_supports('mod', $mod->name, FEATURE_MOD_ARCHETYPE, MOD_ARCHETYPE_OTHER);
|
||||
$purpose = plugin_supports('mod', $mod->name, FEATURE_MOD_PURPOSE, MOD_PURPOSE_OTHER);
|
||||
$isbrandedfunction = $mod->name.'_is_branded';
|
||||
$isbranded = function_exists($isbrandedfunction) ? $isbrandedfunction() : false;
|
||||
$isbranded = component_callback('mod_' . $mod->name, 'is_branded', [], false);
|
||||
|
||||
$icon = 'monologo';
|
||||
// Quick check for monologo icons.
|
||||
|
@ -258,8 +258,7 @@ class core_course_external extends external_api {
|
||||
|
||||
$modcontext = context_module::instance($cm->id);
|
||||
|
||||
$isbrandedfunction = $cm->modname.'_is_branded';
|
||||
$isbranded = function_exists($isbrandedfunction) ? $isbrandedfunction() : false;
|
||||
$isbranded = component_callback('mod_' . $cm->modname, 'is_branded', [], false);
|
||||
|
||||
// Common info (for people being able to see the module or availability dates).
|
||||
$module['id'] = $cm->id;
|
||||
|
@ -78,8 +78,8 @@ class cmicon implements named_templatable, renderable {
|
||||
|
||||
$iconurl = $mod->get_icon_url();
|
||||
$iconclass = $iconurl->get_param('filtericon') ? '' : 'nofilter';
|
||||
$isbrandedfunction = $mod->modname.'_is_branded';
|
||||
$isbranded = function_exists($isbrandedfunction) ? $isbrandedfunction() : false;
|
||||
$isbranded = component_callback('mod_' . $mod->modname, 'is_branded', [], false);
|
||||
|
||||
$data = [
|
||||
'uservisible' => $mod->uservisible,
|
||||
'url' => $mod->url,
|
||||
|
@ -170,8 +170,7 @@ class core_renderer extends \core_renderer {
|
||||
$purposeclass = plugin_supports('mod', $this->page->activityname, FEATURE_MOD_PURPOSE);
|
||||
$purposeclass .= ' activityiconcontainer icon-size-6';
|
||||
$purposeclass .= ' modicon_' . $this->page->activityname;
|
||||
$isbrandedfunction = $this->page->activityname.'_is_branded';
|
||||
$isbranded = function_exists($isbrandedfunction) ? $isbrandedfunction() : false;
|
||||
$isbranded = component_callback('mod_' . $this->page->activityname, 'is_branded', [], false);
|
||||
$imagedata = html_writer::tag('div', $imagedata, ['class' => $purposeclass . ($isbranded ? ' isbranded' : '')]);
|
||||
if (!empty($USER->editing)) {
|
||||
$prefix = get_string('modulename', $this->page->activityname);
|
||||
|
Loading…
x
Reference in New Issue
Block a user