Repaired issue with icon urls
This commit is contained in:
parent
3bc3a1dbec
commit
96a626aaa4
1 changed files with 3 additions and 3 deletions
|
@ -183,15 +183,15 @@ class studyplan {
|
||||||
$file->get_filename(),
|
$file->get_filename(),
|
||||||
false // Do not force download of the file.
|
false // Do not force download of the file.
|
||||||
);
|
);
|
||||||
return $url->out;
|
return $url->out();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try the configured default in settings.
|
// Try the configured default in settings.
|
||||||
$defaulticon = get_config('local_treestudyplan', 'defaulticon');
|
$defaulticon = get_config('local_treestudyplan', 'defaulticon');
|
||||||
if (empty($defaulticon)) {
|
if (empty($defaulticon)) {
|
||||||
// Fall back to the standard (ugly) default image.
|
// Fall back to the standard (ugly) default image.
|
||||||
$url = new \moodle_url($CFG->wwwroot . "/local/treestudyplan/pix/default_icon.png");
|
$url = new \moodle_url($CFG->wwwroot . "/local/treestudyplan/pix/default_icon.png");
|
||||||
} else {
|
} else {
|
||||||
$url = \moodle_url::make_pluginfile_url(
|
$url = \moodle_url::make_pluginfile_url(
|
||||||
\context_system::instance()->id,
|
\context_system::instance()->id,
|
||||||
|
|
Reference in a new issue