moodle-an-hochschulen / moodle-local_profilecohort

Moodle plugin which lets admins manage cohort memberships based on users' custom profile fields
GNU General Public License v3.0
23 stars 19 forks source link

get_all_user_name_fields() is deprecated #45

Closed pkgh closed 2 years ago

pkgh commented 2 years ago

Debugger output - Moodle 3.11.8, local_profilecohort v3.11-r2 2021061301

The following showed after setting up a rule and switching to the "Cohort members" tab:

get_all_user_name_fields() is deprecated. Please use the \core_user\fields API instead

line 3384 of /lib/deprecatedlib.php: call to debugging()
line 108 of /local/profilecohort/classes/profilecohort.php: call to get_all_user_name_fields()
line 72 of /local/profilecohort/classes/profilecohort.php: call to local_profilecohort\profilecohort->output_members()
line 43 of /local/profilecohort/index.php: call to local_profilecohort\profilecohort->output_form()
abias commented 2 years ago

Thank you for this hint, @pkgh !

I have replaced the call to the deprecated function with the \core_user\fields API in the 3.11 version.