You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was just doing some work on the Diary plugin for recent activity, when I go the following error regarding Questionnaire 4.1.1 (Build - 2024082900):
Whoops\Exception\ErrorException thrown with message "user_picture::fields() is deprecated. Please use the \core_user\fields API instead."
Stacktrace: #2 debugging in /var/www/moodledev/lib/outputcomponents.php:257 #1 user_picture:fields in /var/www/moodledev/mod/questionnaire/lib.php:885
#0 questionnaire_get_recent_mod_activity in /var/www/moodledev/course/recent.php:167
I tried the following which seems to fix the error:
//$ufields = user_picture::fields('u', null, 'useridagain');
$userfieldsapi = \core_user\fields::for_userpic();
$ufields = $userfieldsapi->get_sql('u', false, '', 'useridagain', false)->selects;;
The text was updated successfully, but these errors were encountered:
Was just doing some work on the Diary plugin for recent activity, when I go the following error regarding Questionnaire 4.1.1 (Build - 2024082900):
Whoops\Exception\ErrorException thrown with message "user_picture::fields() is deprecated. Please use the \core_user\fields API instead."
Stacktrace:
#2 debugging in /var/www/moodledev/lib/outputcomponents.php:257
#1 user_picture:fields in /var/www/moodledev/mod/questionnaire/lib.php:885
#0 questionnaire_get_recent_mod_activity in /var/www/moodledev/course/recent.php:167
I tried the following which seems to fix the error:
//$ufields = user_picture::fields('u', null, 'useridagain');
$userfieldsapi = \core_user\fields::for_userpic();
$ufields = $userfieldsapi->get_sql('u', false, '', 'useridagain', false)->selects;;
The text was updated successfully, but these errors were encountered: