emmarichardson / local_autogroup

A local plugin for Moodle 2.7 onwards which handles the dynamic creation, population and cleanup of groups on courses.
6 stars 19 forks source link

OAuth and update refresh #53

Open julienhel61250 opened 6 months ago

julienhel61250 commented 6 months ago

Hello,

Thank you for the plugin :)

I'm encountering a refresh error when I modify a user profile field in my authentication manager (Keycloak) linked to my profile via OAuth. For instance, if I change the "Service" field from "IT" to "Accounting," the change is correctly reflected in the Moodle user profile after the user logs out and back in. However, the auto-group is not updated. I need to log out and log back in again for the group to be changed.

Is it possible to execute the user profile modification search function via a CRON task to update the groups?

Bonjour,

Je vous remercie pour le plugin :)

Lorsque je modifie un champ du profil utilisateur dans mon gestionnaire d'authentification (Keycloak) lié à mon profil via oAuth, je rencontre un problème de rafraîchissement. Par exemple, si je change le champ "Service" de "Informatique" à "Comptable", la modification est bien prise en compte dans le profil de l'utilisateur de Moodle après sa déconnexion et sa reconnexion, mais le groupe automatique n'est pas mis à jour. Je suis contraint de me déconnecter et de me reconnecter à nouveau pour que le groupe soit modifié.

Est-il possible, via une tâche CRON, d'exécuter la fonction de recherche des modifications sur le profil utilisateur afin de mettre à jour les groupes ?

julienhel61250 commented 5 months ago

Hello,

Any return ?

emmarichardson commented 5 months ago

Sorry, I must have missed the first message. Do you have all the Event Triggers checked in the Auto group settings..?

julienhel61250 commented 5 months ago

Oh thanks :) !

This is option :

image

emmarichardson commented 5 months ago

So you had all those checked already and it still isn't updating?

julienhel61250 commented 5 months ago

It updates only on the second connection I change the attribute on keycloack I connect it changes in my profile but not in the auto group, I reconnect the auto group is updated.

julienhel61250 commented 5 months ago

So I'm looking for a way where I could for example synchronize every minute if possible?

emmarichardson commented 5 months ago

I actually have a pull request for a cli command to do that - I don’t think you would want to sync that often as it would be pretty intensive on the database..I have been working on a way to test that…but you could try it

Emma Richardson Distance Learning Coordinator Direct: 719-771-4022 Book an appointment HERE On May 24, 2024 at 1:10 AM -0600, julienhel61250 @.***>, wrote:

So I'm looking for a way where I could for example synchronize every minute if possible? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

julienhel61250 commented 5 months ago

Good morning,

No problem performing a test.

Thanks