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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.