Open babington-andy opened 3 years ago
Thanks for reporting this. We are not on 3.11 yet so it may be a while till a fix for this is released...
Hi @jason-platts I've fixed the issue locally by changing...
$fields = explode(',', user_picture::fields('', null, '', null));
...to...
$fields = \core_user\fields::for_userpic();
alternatively $fields = explode(',', user_picture::fields('', null, '', ''));
would work too, but would not be as future proof.
Maybe this can work /lib/outputcomponents.php oublog_stats_output_participation() Function
$userfields = \core_user\fields::for_userpic();
$userfieldssql = $userfields->get_sql('', false, '', '', false)->selects;
// Strip spaces.
$userfieldssql = preg_replace('/\s+/', '', $userfieldssql);
$fields = explode(',', $userfieldssql);
Hello,
We're experiencing this same bug on an upgrade to Moodle 3.11. Is there a timeframe on when it might be patched in an official release? I see that a couple of nice devs have relayed some potential fixes, but I'm unable to edit our code directly, so am reliant on fixed official releases.
Sorry about that, we have pushed the latest code for 3.11 here but haven't yet setup a release in the plugin database... I'll do that today.
Sorry about that, we have pushed the latest code for 3.11 here but haven't yet setup a release in the plugin database... I'll do that today.
No need to apologize! Thank you for supporting FOSS.
Since upgrading to Moodle 3.11 (currently on version 2021051700.06), when accessing an oublog activity the following exception is thrown...
Exception - Argument 3 passed to core_user\fields::get_sql() must be of the type string, null given, called in [dirroot]/lib/outputcomponents.php on line 261
.This is being caused by the oublog_stats_output_participation function in locallib.php on line 4623 (in the current version)
$fields = explode(',', user_picture::fields('', null, '', null));
.The user_picture::fields static method is deprecated in favour of \core_user\fields::for_userpic();