diff --git a/lib.php b/lib.php index a85d371..0e0046b 100644 --- a/lib.php +++ b/lib.php @@ -337,3 +337,51 @@ function theme_trema_pluginfile($course, $cm, $context, $filearea, $args, $force send_file_not_found(); } } + + +/** + * MoodlePage init for adding classes to body tag. + * + * @param moodle_page $page + * @throws coding_exception + */ +function theme_trema_page_init(moodle_page $page) { + global $COURSE, $USER; + + // Add admin classes. + $page->add_body_class(is_siteadmin() ? "is_siteadmin" : "not_siteadmin"); + + // Add module idnumber class. + if (in_array($page->pagelayout, ['incourse']) && !empty($page->cm->idnumber)) { + $page->add_body_class("idnumber-{$page->cm->idnumber}"); + } + + // Add role classes. + if (in_array($page->pagelayout, ['course', 'incourse'])) { + $context = context_course::instance($COURSE->id); + if (user_has_role_assignment($USER->id, 5, $context->id)) { + $page->add_body_class('is_student'); + } + if (user_has_role_assignment($USER->id, 4, $context->id)) { + $page->add_body_class('is_teacher'); + } + if (user_has_role_assignment($USER->id, 3, $context->id)) { + $page->add_body_class('is_editingteacher'); + } + } + + // Show Login form if URL parameters include saml=off or auth=manual. + if (optional_param('saml', '', PARAM_ALPHA) === 'off' || optional_param('auth', '', PARAM_ALPHA) === 'manual') { + $page->add_body_class('local-login'); + } + + // Load course style by shortname from: /style/course/$shortname.css. + if ($COURSE->id > 1) { + $shortname = explode('|', $COURSE->shortname); + $shortname = trim($shortname[0]); + $coursestyle = "/style/course/{$shortname}.css"; + if (file_exists($page->theme->dir.$coursestyle)) { + $page->requires->css(new moodle_url("/theme/trema{$coursestyle}")); + } + } +} diff --git a/locallib.php b/locallib.php index a5ac18c..62ec17f 100644 --- a/locallib.php +++ b/locallib.php @@ -231,46 +231,3 @@ function theme_trema_setting_file_url($setting, $filearea, $theme) { return $url; } - - -/** - * MoodlePage init for adding classes to body tag. - * - * @param moodle_page $page - * @throws coding_exception - */ -function theme_trema_page_init(moodle_page $page) { - global $COURSE, $USER; - - // Add admin classes. - $page->add_body_class(is_siteadmin() ? "is_siteadmin" : "not_siteadmin"); - - // Add module idnumber class. - if (in_array($page->pagelayout, ['incourse']) && !empty($page->cm->idnumber)) { - $page->add_body_class("idnumber-{$page->cm->idnumber}"); - } - - // Add role classes. - if (in_array($page->pagelayout, ['course', 'incourse'])) { - $context = context_course::instance($COURSE->id); - if (user_has_role_assignment($USER->id, 5, $context->id)) { - $page->add_body_class('is_student'); - } - if (user_has_role_assignment($USER->id, 4, $context->id)) { - $page->add_body_class('is_teacher'); - } - if (user_has_role_assignment($USER->id, 3, $context->id)) { - $page->add_body_class('is_editingteacher'); - } - } - - // Load course style by shortname from: /style/course/$shortname.css. - if ($COURSE->id > 1) { - $shortname = explode('|', $COURSE->shortname); - $shortname = trim($shortname[0]); - $coursestyle = "/style/course/{$shortname}.css"; - if (file_exists($page->theme->dir.$coursestyle)) { - $page->requires->css(new moodle_url("/theme/trema{$coursestyle}")); - } - } -} diff --git a/scss/trema/footer.scss b/scss/trema/footer.scss index 87d40cd..5bfc6af 100644 --- a/scss/trema/footer.scss +++ b/scss/trema/footer.scss @@ -135,8 +135,8 @@ footer#page-footer { } .performanceinfo { - background-color: $black; - color: $white; + background-color: $footer-bg-color; + color: choose-contrast-color($footer-bg-color); table.table { width: 100% !important; th { diff --git a/scss/trema/login.scss b/scss/trema/login.scss index a639b28..3bce0fa 100644 --- a/scss/trema/login.scss +++ b/scss/trema/login.scss @@ -223,3 +223,24 @@ body#page-admin-tool-mfa-auth { } } } + +body.local-login { + #login, + .loginform { + .login-form, + .login-form-forgotpassword, + .form-group { + display: block !important; + } + } +} + +// Adjust form label and field alignment on small screens. +@media only screen and (max-width: 560px) { + body #page .signupform .form-group.row.fitem { + display: block; + } + body #page .signupform .form-group.row.fitem .col-form-label { + max-width: 100%!important; + } +} diff --git a/scss/trema/report.scss b/scss/trema/report.scss index c3e6179..7412872 100644 --- a/scss/trema/report.scss +++ b/scss/trema/report.scss @@ -35,9 +35,6 @@ body.path-admin-tool-spamcleaner { background-color: transparent; } } - .table-dynamic { - overflow-x: auto; - } .reportbuilder-sidebar-menu-cards { max-height: max-content; } @@ -58,3 +55,9 @@ body.path-admin-tool-spamcleaner { } } } + +#page-admin-reportbuilder-edit { + #page { + padding: 0 2rem; + } +} \ No newline at end of file diff --git a/version.php b/version.php index 5c52889..dced55e 100644 --- a/version.php +++ b/version.php @@ -28,8 +28,8 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2024111400; -$plugin->release = '4.5.0.3'; +$plugin->version = 2024121200; +$plugin->release = '4.5.0.4'; $plugin->maturity = MATURITY_STABLE; $plugin->requires = 2022021800; // Moodle 4.0 - Build: 20220218. $plugin->component = 'theme_trema';