Repaired issue with icon urls

This commit is contained in:
PMKuipers 2024-12-27 23:22:04 +01:00
parent 3bc3a1dbec
commit 96a626aaa4

View file

@ -183,15 +183,15 @@ class studyplan {
$file->get_filename(),
false // Do not force download of the file.
);
return $url->out;
return $url->out();
}
}
// Try the configured default in settings.
$defaulticon = get_config('local_treestudyplan', 'defaulticon');
if (empty($defaulticon)) {
// Fall back to the standard (ugly) default image.
$url = new \moodle_url($CFG->wwwroot . "/local/treestudyplan/pix/default_icon.png");
// Fall back to the standard (ugly) default image.
$url = new \moodle_url($CFG->wwwroot . "/local/treestudyplan/pix/default_icon.png");
} else {
$url = \moodle_url::make_pluginfile_url(
\context_system::instance()->id,