moodle-an-hochschulen / moodle-theme_boost_union

Theme Boost Union is an enhanced child theme of Boost which is intended, on the one hand, to make Boost simply more configurable and, on the other hand, to provide helpful additional features for the daily Moodle operation of admins, teachers and students.
GNU General Public License v3.0
55 stars 49 forks source link

Improvement: Add moodle docs link for current site as smartmenu item type #657

Open NJahreis opened 1 month ago

NJahreis commented 1 month ago

Hi everyone,

I think it would be nice to be able to add a dynamic link to the moodle docs page as a smartmenu item. While it already can be added to the questionmark menu in the footer this would add additional flexibility to the smartmenus. In my case I added a "Help" smartmenu only visible to teacher roles, and would like the option to add the "Documentation for this page" link directly to this menu, as it is not very visible in the "?" menu.

I implemented a working prototype here: https://github.com/NJahreis/moodle-theme_boost_union/tree/issue657-smartmenu-moodledocs The regex extracting the link from the moodle core function propably needs some improvement, as well as the changes to the caching as I am not sure if the smartmenu cache is broken, if not all items are cached directly. Behat tests are also not implemented yet.