Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting all users in Moodle using the webservices

I'm developing a Java client to interact with Moodle. I want to get all the users registered within a Moodle installation.

I found the webservice function called core_user_get_users which returns a list with users.

When I call the service without any parameters I get a repsonse with a invalid parameter exception.

When I add a criteria parameter (criteria[0][key]=id&criteria[0][value]=some_id) it returns a single user with that specific id.

I can't seem to find what criteria to pass to the function to get the entire list with users registered.

like image 870
Liam de Haas Avatar asked Jun 22 '15 08:06

Liam de Haas


People also ask

How can I see active users in Moodle?

Re: How many active users do I have? If you have administration level access, go to the home page and click on users. Once in the user's view, click yje button to get to the advanced sorting tools. You want the Last login to be checked and set the "is after ..." set to a date three months ago.

Does Moodle have an API?

Moodle has a number of core APIs that provide tools for Moodle scripts. They are essential when writing Moodle plugins.


1 Answers

You can use the email criteria. If you have the value %% it will retrieve all registered users.

like image 135
Liam de Haas Avatar answered Oct 03 '22 14:10

Liam de Haas