Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usage of deprecated get_extra_user_fields and user_picture::fields() and in 3.11 #423

Closed
mdjnelson opened this issue May 27, 2021 · 5 comments

Comments

@mdjnelson
Copy link
Owner

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

line 3331 of /lib/deprecatedlib.php: call to debugging()
line 263 of /mod/customcert/classes/certificate.php: call to get_extra_user_fields()
line 204 of /mod/customcert/classes/report_table.php: call to mod_customcert\certificate::get_issues()
line 2091 of /lib/tablelib.php: call to mod_customcert\report_table->query_db()
line 157 of /mod/customcert/view.php: call to table_sql->out()

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

line 256 of /lib/outputcomponents.php: call to debugging()
line 264 of /mod/customcert/classes/certificate.php: call to user_picture::fields()
line 204 of /mod/customcert/classes/report_table.php: call to mod_customcert\certificate::get_issues()
line 2091 of /lib/tablelib.php: call to mod_customcert\report_table->query_db()
line 157 of /mod/customcert/view.php: call to table_sql->out()

From a message I was sent.

@leonstr
Copy link
Contributor

leonstr commented May 27, 2021

And call to deprecated get_user_field_name() in classes/report_table.php:

line 112 of /mod/customcert/view.php: call to mod_customcert\report_table->__construct()
get_user_field_name() is deprecated. Please use \core_user\fields::get_display_name() instead
line 3373 of /lib/deprecatedlib.php: call to debugging()
line 82 of /mod/customcert/classes/report_table.php: call to get_user_field_name()
line 112 of /mod/customcert/view.php: call to mod_customcert\report_table->__construct()

Originally reported in the forum.

@mdjnelson
Copy link
Owner Author

Thanks Leon.

@mdjnelson
Copy link
Owner Author

Fixed in the MOODLE_311_STABLE branch.

@lcassisi
Copy link

lcassisi commented Apr 4, 2024

Stopped working on Moodle 4.3.3. Got this error:

Detectado un error de codificación, debe ser corregido por un programador: get_extra_user_fields() has been removed. Please use the \core_user\fields API instead.

@leonstr
Copy link
Contributor

leonstr commented Apr 6, 2024

@lcassisi What version of mod_customcert do you have installed? The current version of mod_customcert for Moodle 4.3 (2023042407) does not contain any call to get_extra_user_fields(). If you have this version, please enable debugging to get more details of this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants