Merge branch 'MDL-79890-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE

This commit is contained in:
Ilya Tregubov
2023-11-30 10:45:20 +08:00
6 changed files with 7 additions and 5 deletions
@@ -102,7 +102,7 @@ class block extends base {
*/
public static function add_disabled_constraints_to_form(\MoodleQuickForm $mform) {
$mform->hideIf('targetvalue_block', 'targettype', 'noteq',
\tool_usertours\target::get_target_constant_for_class(get_class()));
\tool_usertours\target::get_target_constant_for_class(self::class));
}
/**
@@ -92,7 +92,7 @@ class selector extends base {
*/
public static function add_disabled_constraints_to_form(\MoodleQuickForm $mform) {
$mform->hideIf('targetvalue_selector', 'targettype', 'noteq',
\tool_usertours\target::get_target_constant_for_class(get_class()));
\tool_usertours\target::get_target_constant_for_class(self::class));
}
/**
@@ -81,7 +81,7 @@ class unattached extends base {
* @param MoodleQuickForm $mform The form to add configuration to.
*/
public static function add_disabled_constraints_to_form(\MoodleQuickForm $mform) {
$myvalue = \tool_usertours\target::get_target_constant_for_class(get_class());
$myvalue = \tool_usertours\target::get_target_constant_for_class(self::class);
foreach (array_keys(self::$forcedsettings) as $settingname) {
$mform->hideIf($settingname, 'targettype', 'eq', $myvalue);
+2
View File
@@ -53,6 +53,8 @@ Local changes (to reapply until upstream upgrades contain them):
cd lib/google/src
for file in `find . -name '*.php' `; do sed -i '/^class /i #[AllowDynamicProperties]' $file; done
```
* MDL-46563 - PHP 8.3 compliance
- Converted use of `get_class()` to `static::class`
Information
-----------
+1 -1
View File
@@ -40,7 +40,7 @@ class Google_Http_REST
$runner = new Google_Task_Runner(
$client,
sprintf('%s %s', $req->getRequestMethod(), $req->getUrl()),
array(get_class(), 'doExecute'),
array(self::class, 'doExecute'),
array($client, $req)
);
+1 -1
View File
@@ -1968,7 +1968,7 @@ class accesslib_test extends advanced_testcase {
$mockedplugins->setAccessible(true);
$plugins = $mockedplugins->getValue();
$plugins['fake'] = [$pluginname => "{$CFG->dirroot}/lib/tests/fixtures/fakeplugins/$pluginname"];
$mockedplugins->setValue($plugins);
$mockedplugins->setValue(null, $plugins);
update_capabilities('fake_access');
$this->resetDebugging(); // We have debugging messages here that we need to get rid of.
// End of the component loader mock.