The badges/index.php and badges/view.php pages are quite similar and
have been merged into index.php.
This commit updates index.php to incorporate the missing information
previously found in view.php.
The logic about adding links to view user posts in the forum module
was previously in core code, but there is an existing callback that
means this can be implemented entirely within the forum module.
Co-authored-by: sam marshall <s.marshall@open.ac.uk>
Per the previous commit, default homepage configuration (set either
for the site or as a user preference) can now be extended by third
party hook callbacks, in which case a URL is stored.
- Add a new method 'add_attribute' to navigation nodes to add HTML attributes to nodes.
- Add data-attribute to section nodes and include them in breadcrumb mustache to automatically update section titles
when sections are renamed.
The backup/view.php page has been created to display the list of
course reuse actions available for users.
That way, the "Course reuse" option in the secondary navigation
will display this page instead of redirecting to the first action
available.
Apart from that, the headers for all the Course reuse actions have
been homogenised and the tertiary navigation selector has been included,
to replace headers and make it easier navigate between actions.
The API was incorrectly assuming that all uses of the API were for a
course, and that the instanceid of the communication instance was a
course id. These assumptions are both entirely wrong.
The API is intended to support a range of uses including use at the
site, user, and activity levels.
Furthermore, if a group were to be used, then the instanceid should be
of that group's id, and therefore the contextid would need to be fetched
or that group's course instead.
The only solution here is to add a new contextid field to the table, and
implement it all parts of the API.
Previously, the type of share (course/activity) was being injected into
the string, but not from a translation, so did not fully translate. The
MoodleNet type (resource) was working, but has also been replaced here
to avoid inserting one string into another (this was also unnecessary
while resource is the only possible option). This also meant the latter
string could be deprecated.
Since custom menu items were merged into the primary navigation/more
menu as part of 56c34d71 and related work, the "title" attribute of
each custom menu item was lost.
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.