1552 Commits

Author SHA1 Message Date
Ilya Tregubov
4272ccd65f MDL-58266 core_completion: Fix upgrade script.
Remove 0 default value for timecreated
in course_module_viewed table
2022-10-17 16:40:07 +03:00
Ilya Tregubov
d5e9b5ba2b MDL-58266 core_completion: Fix incorrect version bump.
Version was bumped in previously merged issue
2022-10-17 14:49:22 +03:00
Ilya Tregubov
057f732bf1 Merge branch 'MDL-58266-master' of https://github.com/JBThong/moodle 2022-10-17 12:51:59 +03:00
Matthew Hilton
cfb643293c MDL-56567 competency: Course module competency option to override grade
Previously, if a course module had already been graded, course module
completion linked to the course module would not update. This
commit adds the option to enable overriding the grade at the course
module competency level.

This ensures that if enabled and a user completes a module associated
with a competency, that competency will be graded appropriately.
2022-10-17 08:00:20 +10:00
hieuvu
c6e018e04e MDL-58266 core_completion: Add new view table. 2022-10-14 00:30:28 +07:00
Paul Holden
fd583ac9f0 MDL-75168 tag: cleanup module tag instances upon course deletion. 2022-09-27 13:40:28 +01:00
anisa kusumadewi
6330c482bd MDL-71129 core_h5p: Added index for pathnamehash to h5p table 2022-09-12 11:41:06 +02:00
Andrew Nicols
903f04a320 Merge branch 'MDL-74608' of https://github.com/timhunt/moodle 2022-08-18 10:52:02 +08:00
Tim Hunt
8babdbd396 MDL-74608 activities: a new option to force the activity language
For a long time, Moodle has had the feature to force the language
for a whole course. This change adds the same feature at activity
level.

The course-level feature was controlled by a capability
moodle/course:setforcedlanguage, and I decided to use the same
capability to control this feature. I think a new capability would be
overkill.
2022-08-15 22:15:52 +01:00
Kevin Pham
af71e4f412 MDL-49795 core: Add foreign keys to core tables in lib
- Includes changes to tables like course, enrol, stage, etc
2022-08-03 15:17:04 +10:00
Eloy Lafuente (stronk7)
58b56e2395 MDL-71747 upgrade: remove all the < 3.9.0 upgrade steps
This just deletes all the upgrade steps previous to 3.9.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2020061500 (v3.9.0) as anti-cheating measure.

The next commits will proceed to deprecate / remove functions
that were exclusively (usually belonging to upgradelib) being
used by those, now removed, upgrade steps. This is the list
of code to remove and document in upgrade.txt files:

  - upgrade_analytics_fix_contextids_defaults()
  - upgrade_convert_hub_config_site_param_names()
  - upgrade_rename_prediction_actions_useful_incorrectly_flagged()
  - \mod_forum\task\refresh_forum_post_counts adhoc task.

And these is the code that has NOT been removed
because it may be needed later (no matter there aren't uses now):

  - \core_search\manager::clean_up_non_existing_area(), used by
  - \core\task\clean_up_deleted_search_area_task adhoc task
2022-07-07 19:16:37 +02:00
Jun Pataleta
c3d4845de2 Merge branch 'MDL-74634' of https://github.com/paulholden/moodle 2022-06-15 16:42:21 +08:00
Paul Holden
e1fefe2e14 MDL-74597 themes: remove pix icon references from custom menu items.
Support for them was removed in 8c336899, however existing config
remained that would lead to bogus URLs in custom user menu items.
2022-06-13 21:43:28 +01:00
Paul Holden
47d119945d MDL-74634 theme_boost: remove old drawer-open-nav user preference. 2022-06-12 20:01:23 +01:00
Paul Holden
67b15496c3 MDL-72377 grade: increase size of category hidden fields.
As well as storing 1/0 to indicate hidden state, they are also used
to store a timestamp indicating hidden until date. Increasing field
size allows these values to be stored without triggering exceptions.
2022-06-06 15:31:02 +01:00
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
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
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
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
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
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
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
e8ad1eaa43 MDL-67853 message: Update notification config and preferences 2022-01-27 15:22:08 +01: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