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

Deprecated Function #33

Closed
Ghiyathshal opened this issue Mar 11, 2022 · 1 comment
Closed

Deprecated Function #33

Ghiyathshal opened this issue Mar 11, 2022 · 1 comment

Comments

@Ghiyathshal
Copy link

Hi, the function get_extra_user_fields() and get_user_field_name in the file mod/quiz/report/answersheets/classes/report_display_options.php are deprecated.
please replace the code in line 165 $userfields = get_extra_user_fields(context_module::instance($cm->id));

with : $context = \context_system::instance();
$userfields = \core_user\fields::for_name()->with_identity($context)->excluding('id', 'deleted');

and the code in line 194 return get_user_field_name($setting); with

$fields = \core_user\fields::for_name()->get_required_fields($setting);
return $fields;

Best Regards
Ghiyath

@timhunt
Copy link
Member

timhunt commented Mar 11, 2022

Yes. We have fixed this locally at the OU. We just have not had time to share that version of the code publicly yet, but that shoud happen soon.

@timhunt timhunt closed this as completed Mar 11, 2022
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

2 participants