-
Improvement
-
Resolution: Fixed
-
Minor
-
4.0.4
-
MOODLE_400_STABLE
-
MOODLE_401_STABLE
-
MDL-75844-master -
The current classList for the document body includes a number of classes, including:
- the cmid;
- the contextid; and
- the path of a page.
Unfortunately it does not include anything to indicate that the current page relates to a specific activity. Whilst the path does include the activity name, in the case of a page belonging to a core subsystem, shown in the context of a specific activity, there is no indication as to this link.
This issue proposes to add the activity name to the classList of the body for any course module, in addition to the cmid and other classes.
This will allow developers and designers to accentuate or hide information in core subsystem pages (such as question pages) for a specific activity where the information is more or less relevant.
In fact, our use case is to be able to use some CSS in StudentQuiz to hide some fields on the question editing form which students don't need to see. Without this change, there is not way to targe stule rules to only affect questions being edited that belong to a StudentQuiz.
- will be (partly) resolved by
-
MDL-75917 Add a modname class to body (backport of MDL-75844) to 4.0
- Closed