- Formatted the query to meet SQL coding styles
- Add index on {files} to prevent performance regression
- Fork the SQL query based on DB family based on support
This patch changes the way adhoc tasks are chosen to run. It now calculates
how many runners each type of adhoc task should be allowed to use. In the
case that not all the runners are utilised, it attempts to infer which
tasks do not take a long time to run, and gives those to the vacant runners.
Thanks to Brendan Heywood for guidance and SQL help.
Without this index, a full table scan / table level locking occurs when
logging out of Moodle. This can result in slow performance in a busy
Moodle site.
The admin preset tool shouldn't export badge/calendar salt configuration
unless explicitely asked for as changing these values on another site
can be potentially destructive.
The previous upgrade step was both duplicating a lot of code, and also
very non-performant as each record was fetched from the DB into PHP and
updated there.
Most of the operations can be performed straight into the database
without requiring any fetch to PHP at all.
This change includes unit tests for the new upgrade steps to ensure that
only the relevant data is created, updated, or deleted.
This commit will add some efficiency around the question
migration.
Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Andrew Lyons <andrew@nicols.co.uk>
This commit will add the index for the question_reference
and the question_set_reference table if its not already
added. This commit will also implement the logic of adding
the question area and component in the joins of the question
reference table in order to make sure any other plugin using
the qbank api does not conflict with each other.
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
Use scheduled_task crontab field verification in
admin/tool/task to unify how Moodle deals with
crontab definition and its verification.
This helps remove duplicated code and fix
crontab definition not allowed in the web form,
but actually was valid.
Updated crontab fields precision on task_scheduled
table to have enough room for the worst case:
all possible different values separated by comma.
This is the list of changes applied to the Starter preset, following
the community suggestions and the latest features included in 4.0:
- Hide Online users, Recently accessed courses and Starred courses.
- Re-enable Description and Essay question types.
- Disable guest enrolment and hide guest login button.
- Reduce the information displayed in the activity chooser.
Apart from that, the User menu items has been removed because it had
the same value in both presets (so it makes no sense having there).
Note that, instead of going one by one to them from the XMLDB Editor
(load, makes some tiny change, save, revert the change, save), the
report includes a commented line that, once uncommented, does regenerate
the file while reporting.
I've left it there as a commodity for the developer.
It's been a mistake to make every Moodle site out there to check for
available update every two hours, on the hour. We are experiencing
server load peaks that are harder and harder to deal with.
The patch addresses this by (1) checking for available updates just once
a day and (2) distributing the checking times randomly around the clock.
Amended because, in all cases, install.xml wins and we
have make upgrade.php to match it...
But in the question_versions->status case, that needs to
be NOT_NULL, so upgrade was correct and install.xml has
been changed for it.
Note this has been changed without using the editor because
it has been detected that there are other changes in the xml
file that have been added manually, we'll create a "reconcile"
issue to fix that (mainly whitespace).
So, yes, please, always use the editor.
The versioning changes will require some major changes
in the backup and restore of question bank and its
elements. This change introduces those changes to make
it compatible with the new world of versioning in question
bank. This commit also removes quiz_slots fields and
quiz_slot_tags table.
This commit will also introduce the versioning db
structure and some major changes to the quiz
and quiz attempts for the question, random
question and the view.
This commit implements the behat changes for versioning
in core question and associated locations.
This commit adds the changes in questiontype base
to work with new question tables and the new structure in the
databse. Also needed for versioning.
This implementation will also introduct the question status
which allows a question to be in draft and ready status.
I also introduces changes to the base view where it shows
the latest version of the questions. The view of versions
for a question is not implemented in this commit.
This implementation will also introduce changes in the core
qtype plugins to support versioning and the changed
db schema.
This commit implements the new database structure for
versioning in question. It also does the migration of
current data to the new structure.
Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>
This commit moves the presets subsystem to a location within the admin
folder, which is more appropriate given its purpose and reduces
developer frustration with tab completion of the admin directory.
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 sensiblesettings setting has been moved from tool_admin_presets
to adminpresets component where it belongs, in order for being able
to use it from the API to decide whether sensible settings should
be included when exporting them.