30995 Commits

Author SHA1 Message Date
Sara Arjona
345d483ee2
Merge branch 'MDL-77651-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-10-18 15:47:24 +02:00
Jun Pataleta
cc9a537bd2
MDL-77651 core: Hide left/right arrow characters for link_arrow_xx()
* The arrow characters in link_arrow_right() and link_arrow_left()
functions get announced by screen readers. This causes confusion
and is unnecessary.
2023-10-17 23:53:05 +08:00
Sara Arjona
c6d8aca226
Merge branch 'MDL-79566-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2023-10-16 09:54:01 +02:00
Huong Nguyen
052e646cdc Merge branch 'MDL-79698-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-10-16 11:40:32 +07:00
Huong Nguyen
0d45970bd3 MDL-79566 tiny_autosave: Add Javascript submission handler 2023-10-16 09:29:28 +07:00
Andrew Nicols
d6fdd2f5f9
MDL-79698 core: Correct duplicate array key in test provider 2023-10-13 15:44:33 +08:00
Huong Nguyen
0257e1696f
Merge branch 'MDL-79638-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-10-12 11:08:05 +07:00
Ilya Tregubov
9fbdf21341
Merge branch 'MDL-79422-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-10-12 09:10:23 +08:00
Andrew Nicols
e7263580b9
MDL-79638 phpunit: Add unit test for increment resets 2023-10-11 00:10:33 +08:00
Andrew Nicols
a74443a342
MDL-79638 phpunit: Adjust version checks for mysql/mariadb hack
This hack was introduced to work around a bug in MySQL 5.6.14 and
MariaDB at the time.

https://bugs.mysql.com/bug.php?id=69882

It was addressed a few months later in 5.6.16, and 5.7.4.
MariaDB merged version 5.6.16 of MySQL's InnoDB engine in MariaDB
10.0.11 and got the patch from there.

Moodle has required MySQL 5.7, and MariaDB 10.2.29 since Moodle 3.11 and
it is therefore safe to remove these hacks for these versions.
2023-10-11 00:02:12 +08:00
Ilya Tregubov
11fe89c08e
Merge branch 'MDL-79501-MOODLE_401_STABLE' of https://github.com/geichelberger/moodle into MOODLE_401_STABLE 2023-10-10 15:07:24 +08:00
Huong Nguyen
c15cb5586c
Merge branch 'MDL-79539-401' of https://github.com/meirzamoodle/moodle into MOODLE_401_STABLE 2023-10-04 10:56:09 +07:00
David Woloszyn
6f2fa6011e MDL-77846 core: Make endpoint revision number checks stricter
In some places we prevented cache poisoning, in others we did not. We
also did not place any restriction on the minimum value for a revision.

This change introduces a new set of functions for configonly endpoints
which validates the revision numbers passed in. If the revision is
either too old, or too new, it is rejected and the file content is not
cached. The content is still served, but caching headers are not sent,
and any local storage caching is prevented.

The current time is used as the maximum version, with 60 seconds added
to allow for any clock skew between cluster nodes. Previously some
locations used one hour, but there should never be such a large clock
skew on a correctly configured system.

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-10-04 02:10:16 +02:00
Andrew Nicols
2f6519d2de
Merge branch 'MDL-78580_401_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_401_STABLE 2023-10-03 11:23:54 +08:00
Ilya Tregubov
109879a2a1
Merge branch 'MDL-79428-401' of https://github.com/srobotta/moodle into MOODLE_401_STABLE 2023-10-03 09:41:21 +08:00
meirzamoodle
15c7909885 MDL-79539 core: handling negative input to get the upper value
Co-authored-by: Alain Corbière <alain.corbiere@univ-lemans.fr>
2023-10-02 20:57:08 +07:00
Gregor Eichelberger
0b28c6a254
MDL-79501 tiny: Fix editing multiple videos
The selection gets lost while opening the modal dialogue to update an
embedded media. Caching the current selection allows us to update the
previously selected node instead of updating the first embedded media.

Signed-off-by: Gregor Eichelberger <gregor.eichelberger@tuwien.ac.at>
2023-09-29 14:11:43 +02:00
Stephan Robotta
f9432283a9 MDL-79428 license: upgrading cc core licenses to version 4.0
The short name of the cc licenses are trailed with a suffix containing
the version number (current 3.0 and 4.0). The old cc* licenses become
the new cc-*-3.0 licenses and are disables, because the new cc*-4.0
licenses are the current ones.

This is a backport of MDL-43195.
2023-09-29 09:39:18 +02:00
Artur Neumann
0c4dc597d7
MDL-79487 oauth2: do not delete refresh token
when `log_out` is called from `\core\oauth2\client` it will delete the refresh token,
what it actually needs to use it to get a new access token
actually logging out is not needed here, the only thing we need to make sure is,
the invalid access token is removed from the session
that is done by storing `null`
2023-09-29 12:14:50 +08:00
Ilya Tregubov
d4c9c36fcd
Merge branch 'MDL-79463-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-28 16:41:19 +08:00
Sara Arjona
c5707a934d
Merge branch 'MDL-79350-401' of https://github.com/daledavies/moodle into MOODLE_401_STABLE 2023-09-28 07:48:06 +02:00
Ilya Tregubov
8e5eda32fe
Merge branch 'MDL-79285_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2023-09-28 10:21:09 +08:00
Ilya Tregubov
20e40c3882
Merge branch 'MDL-79360/401' of https://github.com/skodak/moodle into MOODLE_401_STABLE 2023-09-28 09:38:20 +08:00
Shamim Rezaie
ae0cdf3b67 Merge branch 'MDL-78239-401' of https://github.com/HuongNV13/moodle into MOODLE_401_STABLE 2023-09-27 14:41:23 +10:00
Huong Nguyen
a76f40c81b
Merge branch 'MDL-79467-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-27 10:45:07 +07:00
Eloy Lafuente (stronk7)
68a2dd57ef
MDL-79285 xhprof: Add support for optional "reducedata" parameter
This new parameter / property will decide if we want to reduce
the run data before processing it:
- By default it will be disabled in table mode.
- By default it will be enabled in graph mode.
- The defaults can be changed by adding reducedata=[0|1] in the URLs
- Once data reduction is enabled, it stays enabled while
  navigating within the xhprof reports.
2023-09-26 19:40:07 +02:00
Eloy Lafuente (stronk7)
c841064432
MDL-79285 xhprof: Cover the new functions with unit tests
This covers the 2 new functions with unit tests:
- xhprof_topo_sort()
- reduce_run_data()

Note that the example graph used in the provider is the
one shown in the issue to explain the reduction procedure.
2023-09-26 19:40:06 +02:00
Eloy Lafuente (stronk7)
f82ca155ac
MDL-79285 xhprof: Enable reducing runs data for quicker use
Here we are reducing the xhprof runs data by removing the
__Mustache==>__Mustache calls and all the orphaned data.

To save N iterations what we are doing is:

0. The information is "topologically" sorted, so we ensure that
   all the parents in the data are processed before the children.
   (this will help a lot when cleaning orphaned data, see below).
1. First pass, all the candidate (by regexp) calls are removed
   from the run data.
2. Second pass, all the orphaned information (calls that have
   ended losing his parent) are also removed, so data is consistent.
   Note that, normally we would need N passes to remove all the
   orphaned data (because each pass creates new orphan candidates),
   but, as far as we have ensured that the information is topologically
   sorted (see point 0 above), all this can be done in one unique pass.

TODO:
  - Add unit tests.
  - Enable some system to be able to decide which utilities we
    want to get the data reduced and which ones will continue
    using the complete data. Right now the reduction is being
    applied to all the utilities (both table and graph views).
  - Document the change and, if implemented, the way to select
    between complete/reduced data.
  - Consider adding some caching to speed-up the reduction process
    (some TODOs have been left in the code pointing to the critical
    points).
2023-09-26 19:40:06 +02:00
Sara Arjona
54d446ce43
MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:57:33 +02:00
Huong Nguyen
e8d14cde9a
MDL-78239 editor_tiny: Calculate correct height for non-visible editors 2023-09-26 14:57:24 +07:00
Paul Holden
282523b96a
MDL-79467 output: handle empty sitename display during installation.
Causes PHP warnings when null on PHP 8.1.
2023-09-22 14:34:34 +01:00
Paul Holden
d77a46c804
MDL-79463 output: invert logic in url_select change event.
Avoids eslint `consistent-return` errors (because we previously only
returned from the conditional branch).
2023-09-22 10:22:59 +01:00
Ilya Tregubov
0717d4ea0e
Merge branch 'MDL-79341-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-21 14:51:12 +08:00
Andrew Nicols
b8f45d20fd
MDL-79422 ajax: Allow no-login WS calls to fetch after a failure 2023-09-20 16:02:31 +08:00
Jake Dallimore
2a2edcde93
Merge branch 'MDL-79186-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-19 11:12:51 +08:00
Dale Davies
ce1f9ec96a MDL-79350 core: Do not store lang in session when readonly 2023-09-18 14:31:02 +01:00
Mark Johnson
e6b80e155b MDL-78580 report_statistics: Prevent database deadlocks when viewing
If a quiz had a long job to calculate statstics running, this would
cause pages that may also attempt a recalculation (the statistics report
page or question bank) to load very slowly, and possibly result in a
database deadlock.

This change will firstly prevent the question bank page performing
analysis calculations at all, since these are not required for this
page, which will speed up loading and prevent deadlocks on this page.

Secondly, this adds a lock to the recalcuation process so that it cannot
run twice concurrently. This will present the user with a message to
indicate that it is waiting for a running calculation until it is
complete, and eventually it will timeout with a message and debugging.
2023-09-15 15:16:12 +01:00
Petr Skoda
e42eeb62b0 MDL-79360 filter: fix nolink tag regression from MDL-77525 2023-09-15 12:45:02 +02:00
Huong Nguyen
02e7ab212a
Merge branch 'MDL-79283-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-15 17:37:19 +08:00
Huong Nguyen
c2e501e144
Merge branch 'MDL-78728-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-15 17:32:44 +08:00
Paul Holden
00d7ed9518
MDL-79283 core: add title to embedded iframe, for accessibility. 2023-09-14 09:26:32 +01:00
Jun Pataleta
cdb81ef363
Merge branch 'MDL-79181-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2023-09-14 14:02:29 +08:00
Paul Holden
a3ddbca835
MDL-79341 core: more robust testing of user-agent curl response.
The external test file URL concerns itself only with HTTP_USER_AGENT
matching, not sending response headers, which can differ according to
HTTP protocol in use by the endpoint (1.1 vs 2).

Given the returned response code itself is irrelevant to the testcase,
there's not much benefit to asserting it and risking random failures.
2023-09-13 13:36:28 +01:00
Paul Holden
721b02a270
MDL-79186 task: fix evaluation of 'X/Y' cron field format.
The above syntax is defined as supported by the class, for example the
format '5/10' means:

"At every 10th <unit> from 5 through <max>."

It is analogous to '5-<max>/10'.
2023-09-11 09:22:26 +01:00
Jake Dallimore
35e8d7517f
MDL-79181 core: update LinkedIn OAuth template to use OIDC
The old method (sign in with linkedin) is deprecated:
https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin

This replaces this with the new method:
https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin-v2

This is not entirely OIDC compliant, however. The well known
openid-configuration isn't present at the issuer root and the 'locale'
claim contains an object instead of a string. These are worked around.
2023-09-11 10:42:35 +08:00
Jun Pataleta
9b6ed477f8
MDL-78806 behat: Create a step that for checking the page title
Create a Behat step "the page title should contain ':title'" to check
the page title.
2023-09-10 10:54:18 +08:00
Jun Pataleta
94efef85bb
MDL-78806 behat: More lenient checking of page title
Instead of doing an exact checking of the page title in
\behat_hooks::before_step(), do a more lenient check by checking that
the page title contains the acceptance test's site name.
2023-09-09 21:28:53 +08:00
Jun Pataleta
89e853437b
MDL-78806 core: Add upgrade.txt notes 2023-09-09 08:58:03 +08:00
Jun Pataleta
6664d3ebe6
MDL-78806 admin: Consistent page title during upgrade and install
* Use the page title separator constant when displaying the page title
during upgrade and installation.
* No need to display the site name during install when because it hasn't
been set at this point.
2023-09-09 08:56:50 +08:00
Jun Pataleta
d7cae15e57
MDL-78806 admin: Display the most unique information in the title first
* Page titles should display the most unique information first. For
admin pages it would be useful to display the information that
is unique to the page first before the broader categories that the
page belongs to.
* Also use the new page title separator constant.
2023-09-09 08:56:50 +08:00