Commit graph

3303 commits

Author SHA1 Message Date
Paul Holden
d91df53d63 MDL-74408 core: exclude empty patterns in divert email config. 2022-06-09 09:39:17 +01:00
Daniel Ziegenberg
e2d788f617
MDL-63594 core: Final deprecation of CLI script from admin/tool/task/cli
Following MDL-63580 this now finally deprecates and removes the class
\tool_task\run_from_cli, please use \core\task\manager.

Following MDL-63580 this now finally deprecates and removes
 - admin/tool/task/cli/schedule_task.php, use admin/cli/scheduled_task.php
 - admin/tool/task/cli/adhoc_task.php, use admin/cli/adhoc_task.php

Also mentions and references to the old CLI scripts are updated to
point to the new counterparts.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-06-08 10:55:30 +02:00
Adam Olley
3fc9e345d0 MDL-74886 core_admin: Add unit test
Simple unit test to verify we don't get the TypeError anymore.
2022-06-08 10:06:23 +08:00
Alexey
25b5125187 MDL-74522 lib/classes/navigation fix Navbar My courses data-key value 2022-06-07 16:29:31 +03:00
Paul Holden
3596fc1fe6 MDL-72377 grade: fix category form hidden/until fields.
Ensure the saved values for the hidden and hidden until fields are
populated when editing a grade category. Fix behaviour on enabling
the hidden until field.

Re-enable tests commented out in eba1d32c.
2022-06-06 15:31:03 +01:00
Paul Holden
473ac1285e MDL-73726 dataformat: obey sort order when returning enabled plugins. 2022-06-06 09:32:36 +01:00
Andrew Nicols
fd376582ac Merge branch 'MDL-66453' of https://github.com/dmitriim/moodle 2022-06-02 08:45:03 +08:00
Dmitrii Metelkin
4e353e4812 MDL-66453 uploaduser: Bulk assign roles in course categories 2022-06-02 09:42:17 +10:00
Andrew Nicols
270f466ef5 Merge branch 'MDL-72458' of https://github.com/paulholden/moodle 2022-06-01 23:54:44 +08:00
Jun Pataleta
67da548b48 MDL-72885 output: Add lang attribute for language menu items 2022-05-27 23:39:08 +08:00
Jun Pataleta
92e080465e MDL-72885 core: New weblib function get_html_lang_attribute_value()
Converts a language code to hyphen-separated format in accordance to the
BCP47 syntax appropriate for the HTML lang attribute.

See
https://datatracker.ietf.org/doc/html/rfc5646#section-2.1
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang
2022-05-27 19:38:54 +08:00
Ilya Tregubov
0460147cb5 Merge branch 'MDL-67648-master' of https://github.com/cameron1729/moodle 2022-05-27 15:41:29 +06:00
Jun Pataleta
2814436c44 Merge branch 'MDL-71198-master' of https://github.com/junpataleta/moodle 2022-05-26 10:23:27 +08:00
Jun Pataleta
dac4af8e4c Merge branch 'MDL-73183-master' of https://github.com/andrewnicols/moodle 2022-05-26 10:09:46 +08:00
Peter Burnett
3801662e97 MDL-71198 backup: Change times on restore file duplication 2022-05-25 22:18:36 +08:00
Cameron Ball
f284e446b9 MDL-67648 tasks: Add unit tests 2022-05-25 09:38:41 +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
Daniel Ziegenberg
01309248d8
MDL-72283 caching: internationalize redis session handler error
The 'unable to obtain session lock'-exception raised by the Redis
session handler is hardcoded in English and not all that useful
to the end user.

This change adds the error message to the lang/error.php and gives
the user further hints why the error might have occured and how it
could be fixed.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-05-23 16:42:33 +02:00
Paul Holden
6d5c0190e2 MDL-74192 core: add strictness to persistent get_record method.
Allow developer to specify the given record MUST_EXIST, and the
method to throw the underlying database exception.
2022-05-19 15:21:39 +01:00
Paul Holden
f8790390d0 MDL-72458 user: add timezone to user profile page. 2022-05-10 13:17:06 +01:00
Kordan
84735e806d MDL-73163 behat: Changed most to must 2022-05-09 19:29:19 +08: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
Jun Pataleta
ac3e77b1b1 Merge branch 'MDL-74271-master-squashed' of https://github.com/andrewnicols/moodle 2022-04-07 20:52:10 +08:00
Andrew Nicols
00efa6aecf MDL-74271 context: Improve performance of block context creation 2022-04-06 23:40:15 +08: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)
70e29b77f0 Merge branch 'MDL-74330-master-enfix' of https://github.com/vmdef/moodle 2022-04-05 18:39:23 +02:00
Sara Arjona
e9883614ab Merge branch 'MDL-74078-master' of https://github.com/mickhawkins/moodle 2022-04-04 15:09:34 +02:00
Jake Dallimore
bd58b70e66 Merge branch 'MDL-74276-master-linkfarm' of https://github.com/peterRd/moodle 2022-04-04 15:59:19 +08:00
Víctor Déniz
a51d24c8a8 MDL-74330 lang: Replace modified strings in tests 2022-04-01 13:17:18 +01:00
Jun Pataleta
20f8914f1e Merge branch 'MDL-74390' of https://github.com/timhunt/moodle 2022-04-01 17:00:21 +08:00
Michael Hawkins
a0c6b4a174 MDL-74078 core: Add the ability to lock all blocks on a page 2022-04-01 15:12:56 +08:00
Peter Dias
2c27a33213 MDL-74276 report: Update behat tests to account for new page. 2022-04-01 12:44:04 +08:00
Tim Hunt
409b94cf09 MDL-74390 filter admin: log filter order changes in config_log 2022-03-31 16:49:03 +01:00
Eloy Lafuente (stronk7)
c21a82df58 MDL-72446 behat: Ensure that the day reset happens on enabled element
Before this change we were setting the month day to 1 unconditionally
and that was working ok for enabled by default elements.

But in a number or cases we were doing that against disabled elements
so the day reset was not happening. Now we wait for the element to
be enabled and only then proceed with the day reset.

Backed with tests using disabled form elements, so we have now
both enabled and disabled fields covered.
2022-03-31 11:29:22 +02:00
Tim Hunt
d76a072636 MDL-74270 format_float: fix bug with $decimalpoints=0, $stripzeros=true 2022-03-18 22:12:38 +00:00
Jun Pataleta
1e533995dd Merge branch 'MDL-73233-master' of https://github.com/sarjona/moodle 2022-03-18 00:35:11 +08:00
Andrew Nicols
27bed0b928 Merge branch 'MDL-72991-master-4' of https://github.com/HuongNV13/moodle 2022-03-17 22:25:10 +08:00
Jun Pataleta
cb9480841c Merge branch 'MDL-74216-master' of https://github.com/mihailges/moodle 2022-03-17 19:47:46 +08:00
Huong Nguyen
bfe14e2312 MDL-72991 Course: Partial course cache rebuild with cache versioning 2022-03-17 15:34:26 +07:00
Huong Nguyen
273fbac739 MDL-72991 Course: Create PHPUnit for course_modinfo and move_section_to
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()
2022-03-17 15:34:26 +07: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
Sara Arjona
e3d2fa41d0 MDL-73233 user: Review Start page user preferences
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.
2022-03-16 11:22:22 +01:00
Sara Arjona
5349861e69 MDL-73233 admin: Add enabledashboard setting
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).
2022-03-16 11:22:22 +01:00
Mihail Geshoski
7066c7618c MDL-74216 navigation: Do not show 'My courses' in primary nav to guests 2022-03-16 18:16:58 +08:00
Ilya Tregubov
a5ef320720 Merge branch 'MDL-74071' of https://github.com/paulholden/moodle 2022-03-16 13:57:59 +06:00
Jun Pataleta
8c07f33d80 Merge branch 'MDL-72481-master' of https://github.com/rezaies/moodle 2022-03-16 11:45:40 +08:00
Sujith Haridasan
af496f2c85 MDL-72481 admin: Update behat selector
The more menu can be a tablist or a manubar

Co-authored-by: Shamim Rezaie <shamim@moodle.com>
2022-03-15 12:48:22 +11: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