-
Improvement
-
Resolution: Done
-
Minor
-
4.3.0
-
-
MOODLE_403_STABLE
-
MOODLE_404_STABLE
-
Moodle Apps - 2023 Sprint i4.2, Moodle Apps - 2024 i1, Moodle Apps - 2024 i1.1, Moodle Apps - 2024 i1.2
Right now, the app always add core-course-module-info for site plugins to have a more consistent UI. But the app only has part of the info, e.g. we cannot include the activity description in there so the plugin is the one that needs to display it (using core-module-description, which is deprecated).
If a module tries to use core-course-module-info then the module-info component is displayed twice because the app already adds it in the page. The app should only add this component if the plugin doesn't do it already.
One of the possibilities we discussed was using Angular content projection to detect if the plugin template contains core-course-module-info and project it to the top of the content. I did a quick test, but Angular wasn't able to find the component inside the plugin content because the template is compiled dynamically. So we decided to keep it simple and just check if the template contains the component, without projection.