Moodle HTTP Client Interface
// Login
$moodle->login();
Logged in as: Mario Rossi
// Corsi disponibili
$courses = $moodle->getCourses();
print_r($courses);
Array
(
[0] => Array
(
[courseId] => 6
[courseName] => Foo
[courseLink] => https://elearning.foo.it/course/view.php?id=6
)
[1] => Array
(
[courseId] => 5
[courseName] => Bar
[courseLink] => https://elearning.foo.it/course/view.php?id=5
)
...
// Partecipanti
$courseId = 4;
$attendees = $moodle->getAttendees($courseId);
print_r($attendees);
Array
(
[0] => Array
(
[attendeeName] => Utente Demo
[attendeeEmail] => [email protected]
[attendeeUrl] => https://elearning.foo.it/user/view.php?id=3&course=4
[attendeeImage] => https://elearning.foo.it/theme/image.php/boost/core/1675336758/u/f2
)
...
// Dettagli Partecipante
$attendeeId = 8;
$courseId = 4;
$attendee = $moodle->getAttendeeDetail($attendeeId, $courseId);
print_r($attendee);
Array
(
[attendeeName] => Mario Rossi
[indirizzo email] => [email protected]
[nazione] => Italia
[profili corso] => Webinar
[ruoli] => Manager
...