The selector "I am on the "Course > Section" "course > section" page
has been improved to also support section number.
When "Section x" is given, and there is no section with this name,
section number "x" is used.
* Add a 'requiredfields' parameter for
get_enrolled_courses_by_timeline_classification()
* Set default values for the following course_summary_exporter
properties:
- summary (null)
- summaryformat (FORMAT_MOODLE)
- pdfexportfont (null)
When bulk-updating course module visibility, set_coursemodule_visibily
was triggering a partial cache purge and rebuild for each course module.
This potentially led to 2 cache sets each requiring a lock to be
acquired and released per course module, plus any other cache updates
for other changes to the course in the same request.
This adds a new $rebuildcache paramter to the
set_coursemodule_visibilty, which is true by default to retain the
existing behaviour. If set false, it will skip doing the partial purge
and rebuild for that course module, and it is up to the calling code to
ensure the cache is updated as requried.
To assist with this, there is a new
course_modinfo::purge_course_module_cache_multiple() method, which
allows multiple course modules to be purged from the cache in a single
cache set.
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 new activity card design proposed for Moodle 4.3 differentiates badge
information from other HTML content (displayed using the afterlink feature).
This commit adds a new activitybadge class that can be extended by any
module to display any content in a badge near the activity name. These
are the main features:
- The badge content is always plain text (no HTML).
- The badge style can be set (by default is initialized with badge-none,
but it can be set by any module).
- An optional URL to redirect the user when the badge is clicked.
- An optional ID to add the element in case the module wants to add some
JS to the badge events.
- Optionally, any other extra HTML attributes to the badge element (for
example, data attributes).
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.
When updating/deleting a section/module, the system now only
invalidate of the element (section/module), not the whole course cache
Also, the system now only recalculate the cache for element (section/module)
if necessary, not the whole course cache
Move module/section purging to course_modinfo:
+ course_modinfo::purge_course_section_cache_by_id was created to purge section by id
+ course_modinfo::purge_course_section_cache_by_number was created to purge section by number
+ course_modinfo::purge_course_module_cache was created to purge module
- Introduce core_course_category::get_nearest_editable_subcategory()
- This function will return the first creatable/manageable category
for current user
- With this new function, we can fix the issue that the users with
course management or creation permision at category level cannot see
the manage menu on My courses page
Previously, the timeline block courses view included all courses in
alphabetical order, whether they contained any events matching the
relevant filters or not. This could be tedious and misleading if there
were many courses with no events appearing before a course which did
have matching events. Now, courses are only included if they contain
events matching the currently set time filter and search term. When
those values are modified, the block will be refreshed and fetch
results for the current values, and also takes these into
consideration when determining whether to display the show more courses
button.
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.
Until Moodle 4.0, renderer.php file was optional (although highly recommended)
for course formats. From Moodle 4.0 onwards, renderer is required to support
the new course editor implementation.
The legacy_format_renderer class has been created for backward compatibility,
to avoid some errors with course formats (such as social) without the renderer
file. Apart from that, course_format->get_renderer() method has been reviewed
to use this legacy_format_renderer when no renderer.php file is found.