This has been generated running the following Sniff,
part of the Moodle's CodeSniffer standard:
- PSR2.Methods.MethodDeclaration
It just ensures all the function declarations have
the correct order for:
- abstract and final.
- visibility (public, protected, private).
- static.
So, all the lines modified by this commit are function declarations
and the only changes are in the positions of those keywords.
MDL-78806 core: Remove redundant site name on page titles
* With the site name now being appended to the page titles, there
is no need to manually append the page titles.
Deprecate core_course\output\activity_information class and move its code to two
new classes: core_course\output\activity_completion and core_course\output\activity_dates.
In this process refactor activity_completion improving readability and and also deprecate
renderer_base::activity_information() and core_course_renderer::render_activity_information().
The parameter $size of the following functions has been deprecated and is not used any more:
- file_extension_icon
- file_file_icon
- file_folder_icon
- file_mimetype_icon
- mimeinfo_from_type
- url_guess_icon
That way, the sized icons (xxxxxxx-yyy.png) can be removed and replaced by SVG, to make it easier
to keep them updated because once they are replaced, there will only be one single file for each
MIME icon.
Also removed the 10rem bottom margin form the quiz editing page. It was
there to make sure that there is enough room for the 'add new question'
dropdown. But it's not needed anymore (hasn't been since long time ago).
To ensure legacy course formats works on Moodle 4.0 some method are
reintroduced (but marked as deprecated) like start_section_list and
end_section_list. Furthermore, the course_section_cm_availability
returns a string again as expected.
Before MDL-70801, the "My courses" page didn't exist so the "More"
button displayed bellow the "Enrolled courses" in frontpage pointed
to Dashboard.
I think this is a leftover from the issue when the "My courses" page
was added and it makes more sense using the "My courses" page here
always.
Now content and course index sections have special mutations to store
the collapsed preferences. This way the backend implementation is
independent of the frontend one and can use caches or other kind of
optimizations of necessary.
The course index is the first UI component that implements the new
drawers and the reactive components. The course index uses the course
state to present the current course structure and changes whenever
that structure change.
The deprecated method to render the dropdown based activity chooser
from 430746d3 was still being called, which produced debugging on
the site when doing so.
Deprecate \core_course_renderer::course_section_cm_completion(). It is
not being used anymore and is being replaced by
\core_renderer::activity_information().
With the activity information output component dealing with the
completion information of the activity, there's no need to pass
completion info to the cm_format renderable.
Use the activity information output component to render activity
completion details and activity dates for activities on the course
homepage.
Includes fixup from Shamim Rezaie <shamim@moodle.com>
The activity information output component displays information about
an activity module that can contain:
1. Activity dates
2. Completion information
a. A manual completion button; or
b. A list of automatic completion conditions and their statuses.
This patch also includes a new JS module called
core_course/manual_completion_toggle for toggling the
completion state of activities that support manual completion.