When we change the position of two sections, we just need to update
the position of the affected sections, not all the sections in the course.
This will improve the performance since the system only executes the queries to affected sections.
Also, the system only clears the cache for affected sections, not all the sections in the course.
Newly PHPUnit tests were created to verify the below methods
- course_modinfo::purge_section_cache_by_id()
- course_modinfo::purge_section_cache_by_number()
- move_section_to()
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
The format chooser JS assumes that it is the only mform on the page. If
it is not, and another mform appears before it, then the jump will not
work.
This change:
* updates the formatchooser to modern JS
* allows multiple forms to exist on the page
* stops using id fields
* always hide the format selection button
When accessing to User grades and then to the grades from a
specific course, this call was causing several behat errors
because the dashboard node was not found.
The code causing this issue can be safely removed because it
isn't used (the current node is calculated a few lines below).
- Only add Dashboard to 'home' the root node if the $CFG->enabledashboard
setting is enabled.
- The "More..." link displayed in the "My courses" section from the
navigation block was pointing to the dashboard. However, now that we have
the "My courses" page, it makes more sense to change it and link to it.
- For the User preferences, I've changed breadcrumbs from "Dashboard" to
"Home" because they are more generic (and don't strictly belong to the
dashboard).
The cancel link when content is imported from MoodleNet has
been changed from /my to /, in order to get it working always,
regardless the $CFG->enabledashboard setting is enabled or not.
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.
The "Start page" user preferences page has been reviewed to
consider the new $CFG->enabledashboard setting.
The "Dashboard" won't be displayed in the list if it's disabled.
Besides, the default value is now calculated calling the new
get_default_home_page() method.
The $CFG->enabledashboard setting has been added to Appearance >
Navigation, to let admins disable the "Dashboard" option from the
primary navigation.
This commit also changes the behaviour of get_home_page(), to take
into account this setting and adds a new method, get_default_home_page(),
to return the expected default home page (that wil be used when current
default page is not defined or valid).