3197 Commits

Author SHA1 Message Date
Sara Arjona
df71afbfe9 Merge branch 'MDL-73727-master' of https://github.com/keevan/moodle 2022-06-01 08:41:36 +02:00
Kevin Pham
f984566b15 MDL-73727 core_files: Add subquery to avoid a seq scan on larger sites
- 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
2022-05-30 13:38:45 +10:00
Ilya Tregubov
0460147cb5 Merge branch 'MDL-67648-master' of https://github.com/cameron1729/moodle 2022-05-27 15:41:29 +06:00
Peter Burnett
3801662e97 MDL-71198 backup: Change times on restore file duplication 2022-05-25 22:18:36 +08:00
Cameron Ball
8154aa2e03 MDL-67648 tasks: Fair-share scheduling with resource management
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.
2022-05-25 09:38:41 +08:00
Pete Whelpton
bc6041158c MDL-71202 webservice: Add index on external_tokens.sid
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.
2022-05-10 12:31:25 +08:00
Amaia Anabitarte
ffc655b181 MDL-73878 core_user: Creating a new category for social fields 2022-05-03 17:52:11 +02:00
Eloy Lafuente (stronk7)
76f5445451 MDL-74510 upgrade: add the 4.0.0 separation line to all upgrade scripts 2022-04-22 18:45:10 +02:00
Andrew Nicols
fb0b57f4ab MDL-74506 block: Correct parentcontextid for blocks in dashboard 2022-04-16 17:49:18 +08:00
Andrew Nicols
ed56f9a976 MDL-74506 block: Fix block upgrade to use correct parentcontextid 2022-04-15 20:39:55 +08:00
Paul Holden
a3a473d644 MDL-74489 admin: consider salt configuration as sensitive to 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.
2022-04-12 16:19:40 +01:00
Andrew Nicols
14dca23e1f MDL-74271 core: Replace upgrade steps for blocks to be more performant
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.
2022-04-06 23:40:15 +08:00
Eloy Lafuente (stronk7)
c3f1c89a00 Merge branch 'master_MDL-73808-question-bank-upgrade-bkp' of https://github.com/catalyst/moodle-MDL-70329 2022-03-27 16:01:49 +02:00
Safat Shahin
6045e6b67b MDL-73808 core_question: Add efficiency in question migration
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>
2022-03-24 20:34:14 +11:00
Ilya Tregubov
7bedf54f5b Merge branch 'master_MDL-73763_index-fix' of https://github.com/catalyst/moodle-MDL-70329 2022-03-24 13:14:03 +06:00
Marc-Alexandre Ghaly
c3ac868bf7 MDL-73763 core : Index fixes for reference tables
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.
2022-03-24 18:04:47 +11:00
Eric Merrill
dd5406527a MDL-74269 course: Make sure category exists before updating 2022-03-18 15:30:19 -04:00
Andrew Nicols
27bed0b928 Merge branch 'MDL-72991-master-4' of https://github.com/HuongNV13/moodle 2022-03-17 22:25:10 +08:00
Dongsheng Cai
f97b86e841 MDL-72991 Course: Partial course cache rebuild
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
2022-03-17 15:34:01 +07:00
Víctor Déniz
e95d99ebf1 Merge branch 'MDL-74030' of https://github.com/roland04/moodle 2022-03-14 21:39:40 +00:00
Mikel Martín
d2acd08934 MDL-74030 navigation: Add reports link
Add report builder 'Reports' link to the user menu

AMOS BEGIN
 CPY [reports,moodle],[reports,core_reportbuilder]
AMOS END
2022-03-10 15:46:44 +01:00
Eloy Lafuente (stronk7)
bdedb3f9c9 Merge branch 'MDL-73953-master' of https://github.com/aanabit/moodle 2022-03-02 14:33:07 +01:00
Amaia Anabitarte
7a6d0015e7 MDL-73953 core_adminpresets: Fixing latest created Full preset 2022-03-02 13:45:15 +01:00
Eloy Lafuente (stronk7)
facf5cbcd0 Merge branch 'MDL-73953-master' of https://github.com/aanabit/moodle 2022-03-02 12:54:12 +01:00
Amaia Anabitarte
534cc4dada MDL-73953 core_adminpresets: Apply fullpreset setting changes 2022-03-02 12:49:02 +01:00
Amaia Anabitarte
c0196fb096 MDL-73953 core_adminpresets: Marking core presets on DB 2022-03-02 12:49:01 +01:00
Amaia Anabitarte
77ca86bf87 MDL-73953 core_adminpresets: Upgrading presets with different language 2022-03-02 09:42:46 +01:00
Amaia Anabitarte
acca36d2ad MDL-73747 core_messages: Complete default preferences on migration
Co-authored-by: Jun pataleta <jun@moodle.com>
2022-02-28 11:43:21 +01:00
Ferran Recio
c64bef51a9 MDL-73547 core_courseformat: enable course index cache
Adding caches to the course editor reactive state. The patch improve the
course index loading.
2022-02-21 12:33:33 +01:00
Andrew Nicols
feec9bbb98 Merge branch 'MDL-73748-master-check_for_updates' of https://github.com/mudrd8mz/moodle 2022-02-18 10:49:16 +08:00
Ilya Tregubov
dfa0681c53 Merge branch 'MDL-69764-master' of https://github.com/jpahullo/moodle 2022-02-17 15:02:01 +02:00
Jordi Pujol Ahulló
21f73b29c1 MDL-69764 tool_task: unify crontab verification
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.
2022-02-17 13:24:31 +01:00
Sara Arjona
256232ad46 MDL-73248 adminpresets: Improvements to the Starter preset
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).
2022-02-11 16:41:06 +01:00
Eloy Lafuente (stronk7)
3bb4a4009c MDL-73764 tool_xmldb: Regenerate all the files detected by the report
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.
2022-02-08 19:25:03 +01:00
David Mudrák
38e05ba09f MDL-73748 admin: Check for available updates daily on random time
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.
2022-02-06 22:02:34 +01:00
Sara Arjona
1d0609bbdd MDL-71696 question: Align new tables with install/upgrade
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.
2022-02-03 16:32:04 +01:00
Eloy Lafuente (stronk7)
a2e4be3620 Merge branch 'MDL-73728-master' of https://github.com/andrewnicols/moodle 2022-02-03 14:59:00 +01:00
Safat Shahin
bf55e5a481 MDL-71696 core_question: class autoload changes
This commit implements some class autoloading
fixes to align with core question structure.
2022-02-03 22:22:50 +11:00
Safat Shahin
111951d861 MDL-71696 mod_quiz: quiz updates and behat coverage
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.
2022-02-03 22:22:44 +11:00
Guillermo Gomez
c6cfca2a08 MDL-71696 core_question: Changes for versioning
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.
2022-02-03 22:22:44 +11:00
Guillermo Gomez
c34b89a3c2 MDL-71696 core_question: Implement new database 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>
2022-02-03 22:22:38 +11:00
Andrew Nicols
fc082d349c MDL-73728 admin: Move adminpresets to admin/presets
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.
2022-02-03 19:14:28 +08:00
Ilya Tregubov
57fe1a3099 Merge branch 'MDL-67853-master' of https://github.com/crazyserver/moodle 2022-01-27 16:41:19 +02:00
Pau Ferrer Ocaña
d74bd798b6 MDL-67853 message: Remove on/offline settings on message preferences 2022-01-27 15:22:15 +01:00
Pau Ferrer Ocaña
e8ad1eaa43 MDL-67853 message: Update notification config and preferences 2022-01-27 15:22:08 +01:00
Shamim Rezaie
61f6e6c639 Merge branch 'MDL-73068-master-2' of git://github.com/mickhawkins/moodle 2022-01-25 10:55:47 +11:00
Michael Hawkins
e01f2d514a MDL-73068 timeline: Update courses view to omit courses without events
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.
2022-01-18 18:22:45 +08:00
Sara Arjona
749c678ed5 MDL-73342 admin_presets: Remove blocks from the core presets 2022-01-11 16:58:48 +01:00
Sara Arjona
e5a1b33676 MDL-73397 adminpresets: Move lastpresetapplied to core
In MDL-73394 the lastpresetapplied setting was added to the
tool_admin_presets. This commit moves it to adminpresets.
2022-01-04 12:13:19 +01:00
Sara Arjona
1f47ef1a34 MDL-73397 adminpresets: Move sensiblesettings to core
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.
2022-01-04 12:13:19 +01:00