1
0
mirror of https://github.com/moodle/moodle.git synced 2025-03-27 11:02:38 +01:00

3239 Commits

Author SHA1 Message Date
Andrew Nicols
d6fdd2f5f9
MDL-79698 core: Correct duplicate array key in test provider 2023-10-13 15:44:33 +08: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
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
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
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
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
Sara Arjona
54d446ce43
MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:57:33 +02: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
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
Petr Skoda
e42eeb62b0 MDL-79360 filter: fix nolink tag regression from MDL-77525 2023-09-15 12:45:02 +02: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
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
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
143a3bf38b
MDL-78806 core: Append site name on page title 2023-09-09 08:56:50 +08:00
Paul Holden
3b2690ef9c
MDL-78728 forms: correctly refer to outermost form element.
Read-only forms do not belong to a <form> element, so we can't refer
to that. Instead find the `.mform` element (which exists for regular
and read-only forms).
2023-09-04 16:43:59 +01:00
Jun Pataleta
2a6e9817f1
Merge branch 'MDL-79017-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-31 20:32:03 +08:00
Sara Arjona
33847c2920
Merge branch 'MDL-78707-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-28 16:40:58 +02:00
Andrew Nicols
a9a76642a4
Merge branch 'MDL-79073-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-25 00:07:20 +08:00
Andrew Nicols
6dcb455973
MDL-69187 core_file: Unit test for file_get_typegroup string types 2023-08-22 17:10:36 +01:00
Paul Holden
08344a8c4b
MDL-79073 question: detect missing context when deleting question. 2023-08-22 09:45:25 +01:00
Paul Holden
f9aa8a5d75
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:45 +01:00
Paul Holden
194458b229
MDL-78707 forms: improve form container collapsing mechanism.
By using a more explicit selector for matching containers we avoid
previous problems such as incorrect count, and collapsing of elements
that had the same class name.
2023-08-21 12:38:57 +01:00
Andrew Nicols
d6a9f01cc9
Merge branch 'MDL-78684-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-08-16 22:44:35 +08:00
Petr Skoda
3847e0ba04 MDL-78505 core: stop mangling existing Mardown in text editors
The problem is that HTML Purifier is not compatible with Markdown,
that means we cannot sanitise Markdown texts before editing.

Luckily Markdown has to use plain text editor which does not have
XSS problems.

The only tiny downside is that Markdown cannot be allowed
in "trust text" areas any more.
2023-08-15 14:27:07 +02:00
raortegar
48dc9e6582
MDL-74289 lib: Improve the proxy bypass matching 2023-08-10 18:44:10 +07:00
Sara Arjona
d04d701c18
Merge branch 'MDL-78703-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-08-01 13:45:11 +02:00
Angelia Dela Cruz
efb38571e5 MDL-78684 Behat: Replace gradebook navigation to use page resolvers
This commit also does other things such as:
- Replace manual steps to setup gradebook by data generators
- Added support for outcomes and scales page resolvers
- Behat clean up
2023-08-01 15:55:33 +08:00
Ferran Recio
dcd7261175 MDL-78782 behat: optimize with editing mode step
The current I am on course homepage with editing mode loads twice the
course page. This patch prevents this from happening by going directly
to editmode.php.
2023-07-26 16:19:57 +02:00
Paul Holden
ba6143d1ac
MDL-78703 behat: fix HTTP GET method capitalization on redirect. 2023-07-15 01:00:07 +01:00
Petr Skoda
f25ad012c5 MDL-78525 core: fix word and character counting 2023-07-14 08:44:15 +02:00
Andrew Nicols
10cdb9c72d
Merge branch 'MDL-78556-401' of https://github.com/danghieu1407/moodle into MOODLE_401_STABLE 2023-07-13 09:29:04 +08:00
Sara Arjona
07ef1c6aa5
Merge branch 'MDL-78673-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-07-12 18:18:13 +02:00
danghieu1407
173da3666c MDL-78556 tablelib: flexible_table should support caption tag 2023-07-11 14:18:54 +07:00
Ilya Tregubov
5cecf47fd1
Merge branch 'MDL-77690-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-07-11 09:52:05 +08:00
Andrew Nicols
e0c28bebcb
MDL-78673 behat: Allow plugins to define their expansion of > 2023-07-10 11:29:39 +08:00
Shamim Rezaie
f30316be5d MDL-77375 tool_dataprivacy: set boundary of the dropdowns 2023-07-02 00:06:13 +10:00
Jun Pataleta
213223d162
MDL-77690 core: New activity_header method get_heading_level()
Add a new method for activity_header that determines the heading level
depending on whether the theme displays a heading for the activity
header (usually a h2 heading with the activity name).

E.g. in Boost, the activity name is already being displayed in a
heading. So page headings can be rendered as h2. However, on Classic,
the activity name is being displayed as a h2 heading. So headings need
to be adjusted for the activity pages.
2023-06-30 17:51:12 +08:00
Julien Boulen
4001902464
MDL-78259 weblib: purify audio/video tags as inline elements 2023-06-20 16:37:02 +08:00
Andrew Nicols
196ed7530b
Merge branch 'MDL-69231-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-06-15 10:56:53 +08:00
Paul Holden
05074c1ca3
MDL-74824 user: fix custom change password URL in login notification. 2023-06-11 17:41:09 +01:00
Sara Arjona
4fffa81e41 Merge branch 'MDL-77946-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-06-08 06:56:56 +02:00
Andrew Nicols
1b27cfd795
MDL-76838 core: Add unit test for invalid unicode sequences 2023-06-08 11:59:23 +08:00
Stevani Andolo
bd5329b1a5
MDL-78215 core: Added support unit test 2023-06-08 09:37:02 +08:00
Andrew Nicols
c4cd52ce5a MDL-69231 tests: Add role capability setting generator 2023-06-02 12:42:35 +08:00
Paul Holden
683840999d
MDL-77946 access: fix category sort order of capability contexts. 2023-05-11 08:33:32 +01:00
Laurent David
9117af48ac MDL-77781 core_completion: Completion view must be deleted too
When resetting a course, completion view entries should also be
deleted

Co-authored-by: Georg Moser <georg@moser.link>
2023-05-03 16:05:28 +02:00
Ilya Tregubov
bb5bd2eed8 Merge branch 'MDL-77436-401' of https://github.com/meirzamoodle/moodle into MOODLE_401_STABLE 2023-04-20 16:23:19 +08:00