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 navigation to policy overview page #633

Closed abias closed 1 month ago

abias commented 2 months ago

In Moodle's tool_policy framework, there are two pages which are meant to display existing policies to the end user:

  1. /admin/tool/policy/view.php?policyid=1 - This page takes the policy ID and shows this particular policy to the user, including a full page navigation. This is fine.
  2. /admin/tool/policy/viewall.php - This page shows all policies which exist in the system and is autolinked from the footer (questionmark menu). However, this page does not show any page navigation. It just takes an optional returnurl parameter and links back to this page if this parameter is given. In all cases when this parameter is missing or can't be given, expecially if the admin decided to link manually to this page from anywhere in the footnote or a smart menu, the user is in a dead end situation as soon as he enters this page and can only use the browser back button to return to Moodle.

While view.php sets a page layout directly (see https://github.com/moodle/moodle/blob/main/admin/tool/policy/view.php#L50), the viewall.php page does not (see https://github.com/moodle/moodle/blob/main/admin/tool/policy/viewall.php). But it renders the page_viewalldoc renderer class which sets the popup layout itself.

The goal of this issue is to overwrite the page_viewalldoc renderer class in Boost Union, if possible, and to replace the layout with standard instead of popup there. The setting to control this change could be placed on the Feel page in a new tab called Page layoutswithin the subheading called Policies, but I am not sure if this is the best place.

christianwolters commented 2 months ago

Hi @abias,

reagerading the setting: I second your proposed place in Feel > Policies.

The description of the category reads:

Settings for the overall behaviour of your Moodle site are located here: Navigation items, [...]

That is a match.