Currently, Moodle uses fetchOBject() from ADOdb to get the table columns.
Sadly, the current ADOdb, especially the fetchObject() function, still creates dynamic properties.
Altering the fetchObject() with fetchRow() to avoid the dynamic properties deprecation error on PHP 8.2
The $CFG->svgicons setting was introduced in Moodle 2.4 due to incomplete
SVG support in certain web browsers.
The landscape has evolved significantly since then, and all modern browsers
now handle SVG files correctly.
The $CFG->svgicons settings has been removed and the supports_svg() method
has been updated with currently supported browsers (IE support was removed
in Moodle 3.10).
When updating a manual enrolment instance, the value of 'notifyall' field must be calculated automatically based on the value of
'expirynotify' field. The relevant plugin's method missed that, thus, the value of 'notifyall' field was never updated when
editing a manual enrolment instance and changing the 'expirynotify' setting.
A functional test has been added to test the entire behaviour of the relevant plugin's method.
This covers the case where a course is published and the launch data
doesn't include the 'lineitem' property of the ags claim, meaning the
tool can manage its own line items.
This handles things like site policies, which store the current URL,
redirect to the policy agreement, then redirect back the current URL
afterwards. In such cases, we want to redirect back with 'launchid' set
so that we can fetch the id_token from the session cache. This is the
same thing we already do during account binding, so the patch only
makes sure the PAGE->url is properly set before calling require_login.
If an activity, like workshop or forum, has multiple grade items,
declarative binding of the grade item (line item) isn't supported.
Instead of throwing an exception, handle the case more elegantly
and just omit the 'add to gradebook' option for these activities.
When creating a course, a manual enrolment instance is added by default. The instance settings should inherit the values of those
for the manual enrolment plugin and properly calculate its extra settings. The 'expirynotify' setting wasn't inherited correctly
in case it had 'Enroller + Enrolled' value.
A functional test was added to test the behaviour of settings inheritance.
Only call user_update_user when the relevant user data has changed,
preventing unnecessary user_updated events. This also removes the
line setting timemodified on the user since user_update_user already
handles this.
This commit does few things:
* Unify data generators usage to role short name.
* Replace remaining manual steps to use the new data generator.
* Also replaced other manual steps to set config to use data generators.
* Tidy up of some tests, aligning pipes and splitting one line steps into multiple lines.
* Fixes tests to have one Given/When/Then per scenario.
Many main php files still uses html_writer('p...) to render a simple
paragraphs below or under other elements like forms. In many cases those
texts could be part of a template but there are may scenarios were
creating a full template for a simple paragraph is too much. However,
the html_writer is too limiting as plugins cannot provide their own
implementation. This new method in the renderer is a good in between
solution.
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.