From 94c2a52528fb59a836792578c6f6119d3d37c707 Mon Sep 17 00:00:00 2001 From: hieuvu Date: Thu, 29 Sep 2022 14:16:06 +0700 Subject: [PATCH] MDL-75844 moodle_page: add a modname to body tag. --- lib/pagelib.php | 1 + theme/upgrade.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/pagelib.php b/lib/pagelib.php index 04bba10aff9..e1f345f68bd 100644 --- a/lib/pagelib.php +++ b/lib/pagelib.php @@ -1937,6 +1937,7 @@ class moodle_page { if (!empty($this->_cm)) { $this->add_body_class('cmid-' . $this->_cm->id); + $this->add_body_class('cm-type-' . $this->_cm->modname); } if (!empty($CFG->allowcategorythemes)) { diff --git a/theme/upgrade.txt b/theme/upgrade.txt index efa852ad9e1..0d325363a45 100644 --- a/theme/upgrade.txt +++ b/theme/upgrade.txt @@ -5,6 +5,7 @@ information provided here is intended especially for theme designer. * The function core_course_renderer::course_modchooser() has been finally deprecated and can not be used anymore. Please use core_course_renderer::course_activitychooser() instead. * $OUTPUT->favicon() now returns the URL of the configurable favicon if present. +* The body tag include a class with module name specific for each activity E.g.: cm-type-page === 4.0 === * A new theme config 'removedprimarynavitems' allows a theme to customise primary navigation by specifying the list of items to remove.