jcrodriguez-dis / moodle-mod_vpl

Virtual Programming Lab for Moodle (Module)
GNU General Public License v3.0
97 stars 84 forks source link

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

Closed vahem2lu closed 8 months ago

vahem2lu commented 1 year ago

Using VPL 4.1.0 and deprecation warning from Moodle 4.1.4.

https://github.com/jcrodriguez-dis/moodle-mod_vpl/blob/d9a6ae3ee2ad78a3c75c9920a49d2f72c3ea4faf/vpl_submission.class.php#L587

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

    line 3280 of /lib/deprecatedlib.php: call to debugging()
    line 588 of /mod/vpl/vpl_submission.class.php: call to get_all_user_name_fields()
    line 517 of /mod/vpl/views/submissionslist.php: call to mod_vpl_submission::get_grader()
Astor-Bizard commented 1 year ago

I just want to point out a potential problem with fixing this issue. There would be a loss of retrocompatibility, as \core_user\fields API class was introduced in Moodle 3.11.

vahem2lu commented 1 year ago

You can use newer version of plugin and require newer Moodle for this one. Moodle 3.9 and 3.11 support is about to end anyway.

vahem2lu commented 10 months ago

@jcrodriguez-dis do you have any information on this?

itsguysmiley commented 8 months ago

I am now getting this error on all Graded assignments using M4.3 and VPL 4.2.1 (latest). Is there a fix for this?

itsguysmiley commented 8 months ago

In moodle 4.3 and VPL 4.2.1, this is the stack trace: Stack trace: line 2795 of /lib/deprecatedlib.php: coding_exception thrown line 610 of /mod/vpl/vpl_submission.class.php: call to get_all_user_name_fields() line 487 of /mod/vpl/views/submissionslist.php: call to mod_vpl_submission::get_grader()

jcrodriguez-dis commented 8 months ago

VPL 4.2.2 Release: Resolution of get_all_user_name_fields() Deprecation Warning

Best regards,
Juan Carlos.