Manage Moodle from NodeJS
npm install moodle-node
const moodle = require('moodle-node');
const user = await moodle.user.createUser({
username: 'joeblow',
password: 'Pass1234!',
email: 'joeblow@nowhere.com',
firstname: 'Joe',
lastname: 'Blow',
});
console.log(user);
The output is a JSON object or array based on the function called:
[
{
"id": 7,
"username": "joeblow"
}
]
If you ever need a hand or have any questions, feel free to reach out.
Fred Lackey
https://fredlackey.com
fred.lackey@gmail.com