-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlib.php
52 lines (47 loc) · 1.71 KB
/
lib.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Basic lib file for local_coursetheme.
*
* @package local_coursetheme
* @copyright 2024 ISB Bayern
* @author Philipp Memmel
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
use local_coursetheme\db\Theme_table;
use local_coursetheme\db\Coursetheme_table;
function local_coursetheme_before_footer() {
// global $PAGE, $COURSE, $DB;
// $courseId = $COURSE->id;
// if (!$courseId) return;
// $coursetheme = $DB->get_record(Coursetheme_table::TABLE_NAME, ['courseid' => $courseId]);
// if (!$coursetheme) return;
// $themeId = $coursetheme->{Coursetheme_table::FIELD_COURSE_THEME_ID};
// if (!$themeId) return;
// $theme = $DB->get_record(Theme_table::TABLE_NAME, ['id' => $themeId]);
// if (!$theme) return;
// $css = $theme->{Theme_table::FIELD_CSS};
// $js = $theme->{Theme_table::FIELD_js};
// if ($css) {
// echo '<style>';
// echo $css;
// echo '</style>';
// }
// if ($js) {
// echo $js;
// }
}