Commit Graph

2469 Commits

Author SHA1 Message Date
Paul Holden 5e91f88d4b MDL-79017 core: re-factor method to unserialize array.
We can use the existing helper for object unserialization as the
base for this method, rather than manual string parsing.
2023-08-21 21:02:48 +01:00
raortegar c1ed3e422d MDL-74289 lib: Improve the proxy bypass matching 2023-08-10 18:45:11 +07:00
Andrew Nicols 3801d87036 Merge branch 'MDL-76838-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2023-06-08 11:54:54 +08:00
Stevani Andolo 6ae19a6c9a MDL-78215 core: support checking if 0.0.0.0 is in subnet 2023-06-08 09:37:21 +08:00
Sara Arjona 34fbef096e Merge branch 'MDL-76936-400' of https://github.com/HirotoKagotani/moodle into MOODLE_400_STABLE 2023-06-06 11:22:21 +02:00
Paul Holden fa042d8849 MDL-76838 backup: remove invalid utf8 code sequences writing XML.
The surrogate blocks FFFE and FFFF are non-characters, specifically
disallowed in the character range for XML documents.
2023-05-22 21:04:17 +01:00
fcbsd fc1adc914c MDL-77365 count_words: Make span> an inline tag MOODLE_400_STABLE 2023-03-01 16:05:24 +00:00
Hiroto Kagotani 7b79101032 MDL-76936 course: purge course cache on resetting start date 2023-01-19 20:01:03 +09:00
Tim Hunt 0dcd79d2e8 MDL-76649 quiz statistics task: output more useful trace info
At the moment, quiz_statistics\task\recalculate gives no useful
information about what it is doing, which makes it hard to investigate
if the task fails. This commit makes it more usefully verbose.

Also, following this change, one instance of this task will not
run for more than one hour at a time.

As part of this commit, I have added a new helper mtrace_exception.
to consistently log exceptions in scheduled tasks. It is sad to
add a new function to moodlelib.php, but that seemed the logical place.
Looking at other tasks, this method is badly needed. Many are just
logging the ->getMessage() which is normaly insufficient for proper
debugging. However, swiching all existing tasks to use the new function
will need to wait for a future MDL.
2023-01-09 13:46:29 +00:00
Noemie Ariste 8cded7cd9f MDL-60038 moodlelib: ignore site policy if user auth type = 'webservice' 2022-12-23 10:03:41 +13:00
David Woloszyn 7eadd4979c MDL-76091 lib: Add additional check to local URLs params 2022-11-09 19:24:27 +08:00
Jun Pataleta 9cca971abc MDL-72882 core: Use default site lang when user lang no longer available
* Check that the lang attribute for the output HTML exists. If not,
use the default site language.
* Also fix the current language for the user.
2022-11-03 14:00:09 +08:00
Dan Marsden 2c99c5fa4d MDL-75010 core: Prevent user last access update on user key login 2022-10-31 14:19:31 +13:00
Paul Holden e46420e57e MDL-75168 tag: cleanup module tag instances upon course deletion. 2022-09-27 14:10:57 +01:00
Tim Hunt 9a0c490680 MDL-75548 misc: final Required parameter follows optional notices 2022-08-22 15:19:34 +01:00
Petr Skoda 754b7af680 MDL-75237 core: improve PARAM_SAFEPATH docs 2022-08-12 04:15:20 +02:00
Petr Skoda b0388fdc49 MDL-75237 core: Revert MDL-72029
This reverts commit a212b1ec3e.
2022-08-12 04:15:20 +02:00
Huong Nguyen a212b1ec3e MDL-72029 lib: Prevent path traversal for clean_param with PARAM_SAFEPATH 2022-07-06 05:25:29 +02:00
Andrew Nicols 7ff7ca5c6e Merge branch 'MDL-74408-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE 2022-07-06 11:02:41 +08:00
Andrew Nicols 4fd50e8cd9 MDL-74379 core: Update date_format_string to use x-os functions 2022-06-30 10:35:41 +08:00
Aya Saad e6441d7fdb MDL-74379 language: injecting am/pm in date string
patching the date_format_string() function in moodlelib to add am/pm for languages that don't suuport it.
2022-06-26 10:36:29 +02:00
Paul Holden 2408bd007b MDL-74408 core: exclude empty patterns in divert email config. 2022-06-09 09:39:24 +01:00
Paul Holden b6d8939959 MDL-72634 user: populate default city/country during user creation. 2022-03-22 17:28:09 +00: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
Huong Nguyen bfe14e2312 MDL-72991 Course: Partial course cache rebuild with cache versioning 2022-03-17 15:34:26 +07: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
Andrew Nicols 20a016c6e3 Merge branch 'MDL-73582-master-nocache' of https://github.com/vmdef/moodle 2022-02-28 12:50:21 +08:00
Bas Brands 09aa3ad82a MDL-73794 theme_boost: set footer background white 2022-02-17 13:06:56 +01:00
Víctor Déniz 8c5c7070c0 MDL-73582 registration: Add endpoint to provide version to linkchecker 2022-02-16 20:40:23 +00:00
Cameron Ball 776bfb134c MDL-73427 core: Remove $SESSION->fromurl 2022-01-05 19:39:21 +08:00
Bas Brands f2ddd23ec1 MDL-71457 theme_boost: activity icon styling 2021-12-20 15:02:24 +01:00
Mathew May 54e098c5a5 MDL-73231 my: Allow my courses to be a homepage 2021-12-13 22:43:28 +08:00
Andrew Nicols 97764798a4 Merge branch 'MDL-66776-master' of https://github.com/jleyva/moodle 2021-11-08 08:28:23 +08:00
Juan Leyva 39d96944eb MDL-66776 notifications: New login session notification 2021-11-04 11:18:00 +01:00
Paul Holden e22fded5fe MDL-70823 core: safer alternative for unserializing objects. 2021-11-03 16:57:06 +01:00
Andrew Nicols c5714ac280 Merge branch 'MDL-71211-master-v03' of git://github.com/ferranrecio/moodle 2021-10-20 09:04:57 +08:00
sam marshall 9c29979b8b MDL-72596 core_cache: Track cache I/O size in perfdebug
For cache types which mean this information can be obtained without a
significant performance cost (i.e. just by calling strlen and not
having to serialize something that wasn't serialized already),
this change calculates the size of data read from or written to cache
in each request and includes it in the perfdebug table at bottom of
output (when that is turned on).

This supports the following cache types:

* File store
* Redis (only if caching is enabled)
2021-10-19 17:00:48 +01:00
Ilya Tregubov 0350d42610 MDL-71211 core_course: Keep the status of course index. 2021-10-19 13:17:25 +02:00
sam marshall e332d1849d MDL-72643 core: Improve display_size
Allows display_size to use a fixed unit for easy comparison of
multiple results, and fixed decimal places for the same reason.

Improves behaviour by using consistent decimal places and a
consistent space before the unit (the previous one only has a space
before 'bytes', not before 'KB').

Of existing uses, all the ones that displayed a 'maxbytes' type
configuration setting (which are likely to have an 'exact' size
and would be better shown as 512 KB rather than 512.0 KB) have been
changed to use 0 decimal places, to preserve previous behaviour.
All the uses which were showing an actual file or memory size have
been left as default (1 decimal place).
2021-09-27 16:52:33 +01:00
Brendan Heywood 7b938088b5 MDL-71014 core: Cache immutable bootstrap config locally 2021-09-02 13:22:28 +10:00
Mihail Geshoski 4772dece1d MDL-58393 core: Remove firstname argument from emailconfirmation string 2021-07-08 23:30:33 +02:00
Ferran Recio 934fd12ca8 MDL-71863 core: add templates to ignored plugin folders 2021-06-28 13:50:18 +02:00
Ferran Recio 21d93554d4 MDL-71863 courseformat: create courseformat subsystem 2021-06-28 13:50:18 +02:00
Andrew Nicols c1b5ff301c Merge branch 'MDL-71637-master' of git://github.com/peterRd/moodle 2021-05-27 11:47:59 +08:00
Sara Arjona eeb5b4b4d8 Merge branch 'MDL-53544-master-2' of git://github.com/peterRd/moodle 2021-05-26 12:39:25 +02:00
Peter Dias 490c72f491 MDL-53544 core: Remove typo3 usages in core 2021-05-26 16:46:30 +08:00
Peter Dias 5bf48252b5 MDL-71637 core: Set default for mb_substitute_character 2021-05-26 13:51:46 +08:00
Andrew Nicols 053b0462fd MDL-70990 core: Ignore amd directory in plugin-like lists
The `get_list_of_plugins()` function is used to fetch plugin-like files
or directories from a specified directory. A number of standard
exclusions are included but this list is not the same as the list in
`core_component`.

The list has been updated to include the `amd` directory, which is
regularly used in both components, and plugins.
2021-05-24 08:47:09 +08:00
Marina Glancy b46badb130 MDL-70926 core: getuserdate() shoud show debugging if null was passed
passing null to getdate() has different results in PHP7 and PHP8
2021-05-06 19:55:32 +02:00