hi there!
I'm developping an ad hoc module (Time Awareness Tool), and I've two questions:
1, how to get the auth user $roleid
2, by using the auth user $id, how to get all group members $id (the list of id of his course group collegues)
Merci d'avance !
Best regards from Nimes,
margarida
$context = get_context_instance (CONTEXT_SYSTEM);
$roles = get_user_roles($context, $USER->id, false);
$role = key($roles);
$roleid = $roles[$role]->roleid;