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

get_all_user_name_fields() deprecated since Moodle 3.11 #5

Open
top-ender opened this issue May 23, 2024 · 2 comments
Open

get_all_user_name_fields() deprecated since Moodle 3.11 #5

top-ender opened this issue May 23, 2024 · 2 comments
Assignees

Comments

@top-ender
Copy link

Linked form old repo:

jleyva#247


We use this plugin now with Moodle 4.3 and 4.4 and got the same error message when using the user-filters.
For a quick and dirty solution to keep the plugin running we locally changed two lines in components/filters/users:

- $sort = implode(',', order_in_string(get_all_user_name_fields(), $nameformat));
+ $sort = implode(',', order_in_string(\core_user\fields::get_name_fields(), $nameformat));
- $users = $remotedb->get_records_select('user', "id " . $usql, $params, $sort, 'id,' . get_all_user_name_fields(true));
+ $users = $remotedb->get_records_select('user', "id " . $usql, $params, $sort, 'id,' . \core_user\fields::for_name()->get_sql('', true, '', '', false )->selects); 

Maybe this could support the further development of this plugin.

Regards,
Christoph

@gemguardian gemguardian self-assigned this Jul 5, 2024
@gemguardian
Copy link
Member

@top-ender thank you for providing this solution. We did the 4.1 update as a collabrated community project, that is been funded by 3 organization. We don't have any funds left to continue fixing issues. Though in this case I am inclided to see if we can implement the suggestion and then push to the orginal developer.

@luukverhoeven is there time within your team to check this solutions? And if so - how much time would you need.

@luukverhoeven
Copy link
Collaborator

@gemguardian This approach would work for 4.3 and 4.4. Maybe the best option would be to create new separate 4.3/4.4 releases for it. I don’t think this is backwards compatible with 4.1.

We need 30-60 minutes to implement, test, and deploy it to Moodle.org/GitHub.

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