Skip to content
Snippets Groups Projects
Commit b3d3196d authored by Tim Schroeder's avatar Tim Schroeder
Browse files

now using favicon configured for boost_campus theme

parent e21f4249
No related branches found
No related tags found
No related merge requests found
......@@ -26,12 +26,15 @@
namespace theme_boost_campus_rwth\output;
require_once($CFG->libdir. '/filestorage/file_storage.php');
require_once($CFG->libdir. '/outputlib.php');
require_once($CFG->dirroot. '/course/lib.php');
use html_writer;
use moodle_url;
use moodle_page;
use single_button;
use context_course;
use theme_config;
defined('MOODLE_INTERNAL') || die;
......@@ -46,6 +49,21 @@ defined('MOODLE_INTERNAL') || die;
*/
class core_renderer extends \theme_boost_campus\output\core_renderer {
protected $boostcampus;
public function __construct(moodle_page $page, $target) {
parent::__construct($page, $target);
$this->boostcampus = theme_config::load('boost_campus');
}
public function favicon() {
if (!empty($this->boostcampus->settings->favicon)) {
return $this->boostcampus->setting_file_url('favicon', 'favicon');
} else {
return $this->image_url('favicon', 'theme');
}
}
/**
* Override to dispaly switched role information beneath the course header instead of the user menu.
* We change this because the switch role function is course related and therefore it should be placed in the course context.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment