Commit Graph

31250 Commits

Author SHA1 Message Date
Jun Pataleta
71216a0b1d Merge branch 'MDL-78092-master' of https://github.com/sammarshallou/moodle 2023-06-01 11:36:44 +08:00
Ilya Tregubov
9d6e83274a Merge branch 'MDL-78317-master' of https://github.com/andrewnicols/moodle 2023-06-01 11:17:31 +08:00
Andrew Nicols
d60ce4c575 Merge branch 'MDL-78146-master' of https://github.com/meirzamoodle/moodle 2023-06-01 11:01:34 +08:00
Andrew Nicols
a1e6cc6747 Merge branch 'MDL-76397-master' of https://github.com/stevandoMoodle/moodle 2023-06-01 10:57:14 +08:00
Andrew Nicols
8d1a2c960a MDL-78019 core: Whitespace fixes 2023-06-01 10:20:06 +08:00
Andrew Nicols
e60843f355 Merge branch 'MDL-78019' of https://github.com/AnupamaSarjoshi/moodle 2023-06-01 10:14:18 +08:00
Ilya Tregubov
59cd47c02f Merge branch 'MDL-62859' of https://github.com/paulholden/moodle 2023-06-01 10:12:14 +08:00
Andrew Nicols
64dbf7c1f2 Merge branch 'MDL-78142-master' of https://github.com/meirzamoodle/moodle 2023-06-01 09:51:22 +08:00
Ilya Tregubov
f245db464f Merge branch 'MDL-71067' of https://github.com/paulholden/moodle 2023-06-01 08:55:36 +08:00
Sara Arjona
6a27e5f8a7 Merge branch 'MDL-78145-master' of https://github.com/meirzamoodle/moodle 2023-05-31 12:09:17 +02:00
Ilya Tregubov
accddabca3 Merge branch 'MDL-77168-master' of https://github.com/andrewnicols/moodle 2023-05-31 10:22:02 +08:00
Ilya Tregubov
9bc2c51e4a Merge branch 'MDL-73138' of https://github.com/paulholden/moodle 2023-05-30 12:53:47 +08:00
Jun Pataleta
c0bca499df Merge branch 'MDL-78266-master' of https://github.com/andrewnicols/moodle 2023-05-29 17:16:03 +08:00
Meirza
4c2d560fc7 MDL-78146 lib: Added missing class properties in phpmailer
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-27 11:25:38 +07:00
Meirza
928b300bc7 MDL-78145 lib: Added missing class properties in pear
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-27 11:11:12 +07:00
Meirza
0d54d69c22 MDL-78142 lib: Added class properties that are not declared in bennu
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-27 09:49:39 +07:00
Anupama Sarjoshi
b4b9248b78 MDL-78019 core: Logs to record user file deleted from draft area 2023-05-26 17:45:36 +01:00
Paul Holden
8c7158e224 MDL-71067 phpunit: final removal of deprecated 311 coverage properties. 2023-05-26 13:40:35 +01:00
Paul Holden
5cc7311717 MDL-73138 user: avoid double encoding participant filter values. 2023-05-26 10:25:33 +01:00
Andrew Nicols
18dc795907 MDL-78266 core: Simplify string fetching/storing/retrieval
Rather than storing strings by an ID, we instead store them by the
string placeholder value.

This means that:
- we can fetch them by placeholder (e.g. `[[_s144]]`) rather than by
  index
- we can lazily clean them on fetch
- we only clean them once, rather than on every insertion.
2023-05-25 13:42:15 +08:00
Andrew Nicols
a438e2c72d MDL-78266 core: Simplify string treatment in core/templates
The old handling was extremely convoluted, and likely inefficient.

It's much clearer to use a regex with named groups and loop through in a
standard way.
2023-05-25 13:42:08 +08:00
Andrew Nicols
1ef815cd97 MDL-78266 core: Break apart core/templates
This commit breaks apart the responsibilities of the core/templates
module to separate out the different constituent parts. Broadly speaking
these are:
- core/local/templates/loader - responsible for fetching, and caching,
  of templates
- core/local/templates/renderer - A Moodle wrapper around the Mustache
  engine
2023-05-25 13:42:00 +08:00
Andrew Nicols
16dee82ce5 MDL-78266 core: Migrate core/templates to esm 2023-05-25 12:09:46 +08:00
Andrew Nicols
e82aed72e6 Merge branch 'MDL-78012' of https://github.com/paulholden/moodle 2023-05-25 12:02:55 +08:00
Jun Pataleta
fe69b61828 Merge branch 'MDL-78169-master' of https://github.com/andrewnicols/moodle 2023-05-25 11:50:22 +08:00
Jun Pataleta
881b51c8e2 Merge branch 'MDL-77159-master' of https://github.com/andrewnicols/moodle 2023-05-25 11:39:52 +08:00
Petr Skoda
8a9e5aeb7a MDL-78332 core: fix hook discovery and use is_subclass_of()
And order hooks in admin UI - core first.
2023-05-24 19:53:18 +02:00
Andrew Nicols
c730b8735f MDL-77159 tool_langimport: Replace YUI module with ESM 2023-05-24 20:40:14 +08:00
Petr Skoda
0dcb5c4281 MDL-78332 core: remove unnecessary hooks reset method 2023-05-24 14:35:59 +02:00
Jun Pataleta
ac0767cac4 Merge branch 'MDL-77353_Master' of https://github.com/catalyst/moodle-MDL-76126 2023-05-24 20:18:59 +08:00
Andrew Nicols
cb3ea26ae6 Merge branch 'MDL-78016' of https://github.com/stronk7/moodle 2023-05-24 14:32:56 +08:00
Jun Pataleta
d78de537ff Merge branch 'MDL-78005-master' of https://github.com/davewoloszyn/moodle 2023-05-24 12:06:52 +08:00
Jun Pataleta
6ee1bac7d8 Merge branch 'MDL-78132-master' of https://github.com/sarjona/moodle 2023-05-24 12:04:58 +08:00
Nathan Nguyen
f897ecd627 MDL-77353 core_user: new functions
New functions:
    * `core_user::get_profile_picture` for retrieving user picture.
    * `core_user::get_profile_url` for retrieving profile url.
    * `core_user::get_fullname` for retrieving user full name.

Note: the context is not used as this stage. It will be used by "User Disguises" plugin, which will be implemented later.
2023-05-24 13:05:02 +10:00
Andrew Nicols
67ba0d3e83 MDL-74954 core: Detect changes to hook overrides 2023-05-23 16:03:37 +08:00
Sara Arjona
e7ec8da607 MDL-78132 badges: deprecate functions and strings
When the logic to get the correct apiBase has been moved to the
backpack, some strings and methods have been marked as deprecated.
2023-05-23 08:47:10 +02:00
Andrew Nicols
03e4afdb39 MDL-78132 badges: move apiBase consumption to backpack
The logic to create the issuer has been moved to the backpack form
in order to improve the workflow and update the apiBase with the
proper value comming from the badgeconnect.json manifest file.

So, as part of this change in the workflow, the following changes
has been also implemented (to make the UI easier for users):

- The "Open Badges" oAuth issuer button has been removed from the
"OAuth Services" admin page. As they are created/updated when a backpack
is saved, this button is not required anymore.
- The "OAuth2 services" and "Backpack API URL" parameters have been
removed from the Manage backpacks form, because they are created on
the fly each time the backpack is saved.
2023-05-23 08:46:39 +02:00
Stevani Andolo
bba2bf5ee6 MDL-76397 lib: Moodle customizations. 2023-05-23 11:14:06 +08:00
Stevani Andolo
ae0ea56f25 MDL-76397 lib: xhprof upgraded to 2.3.9 2023-05-23 11:14:06 +08:00
Paul Holden
c5d1f72dca MDL-62859 javascript: replace user preference calls with new methods. 2023-05-22 13:51:39 +01:00
Andrew Nicols
ea64a11963 MDL-74954 core: Remove failing deprecated hook test for now
This test cannot be made to work while there are no hooks to test.

When we add our first hooks, we can add these tests back and provide a
fake implementation for them in an isolated test run.
2023-05-22 20:04:23 +08:00
Andrew Nicols
91dc4b6501 Merge branch 'MDL-74954-master' of https://github.com/skodak/moodle 2023-05-22 20:03:13 +08:00
Petr Skoda
d57acd957c MDL-74954 core: remove failing hooks test for now 2023-05-22 13:21:53 +02:00
Sara Arjona
aebc13a62d Merge branch 'MDL-75963-master' of https://github.com/meirzamoodle/moodle 2023-05-22 12:15:58 +02:00
Sara Arjona
fa8c3be540 Merge branch 'MDL-78225' of https://github.com/paulholden/moodle 2023-05-22 12:04:07 +02:00
sam marshall
a2af6bd669 MDL-78092 Cache: Modinfo locking with Redis store does not work
The feature added in 4.1 to lock the modinfo cache does not work when
using Redis, because:

* The API to acquire a cache lock is confusing, and the code did not
  check that it successfully acquired a lock before going on to build
  the cache anyway.

* Unlike the other types of cache lock, the Redis store did not retry
  the lock for a timeout period before giving up and failing.

This change fixes both points.
2023-05-22 10:43:14 +01:00
Andrew Nicols
9b174fd3cc MDL-78157 js: Be more careful about inserting missing module names
It is perfectly legitimate to create and/or use a method named `define`
in JS outside of RequireJS.

Unfortunately our requirejs.php wrapper is dumb and does not understand
this.

In the long term we need to stop doing this at all. We really should be
able to already, but every time I try to something prevents it.

In the interim, this change adds a secondary check to see if there is an
existing define which _does_ have the right name in it already.
2023-05-22 14:40:41 +08:00
Andrew Nicols
07a1dc04f8 MDL-74954 core: Add hook discovery feature 2023-05-20 11:03:46 +02:00
Petr Skoda
99a7a7c782 MDL-74954 core: add Hooks based on PSR-14 2023-05-20 11:03:46 +02:00
Eloy Lafuente (stronk7)
ff8a9478b2 MDL-78016 dml: Add Oracle support for OFFSET ... FETCH clauses
Since Oracle 12, these statements (providing the same than the
well-known LIMIT clauses in MySQL and PostgreSQL) are available,

Just let's switch to use them, removing the old complex ROWNUM
based queries needed before to provide limits support.
2023-05-19 17:47:57 +02:00