How To / General

Community Builder's Moderators profile don't get synced to moodle

  • Web Buster UK Ltd
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 years 7 months ago - 5 years 7 months ago #1 by Web Buster UK Ltd
Hi Antonio, we encountered a strange new bug, I'm not quite sure when did this come about because it's been working fine before. Some users' profile fields are not getting synced to moodle. I've pretty much excluded other factors such as CB Privacy or CB Conditional plugins.

It seems to be solely down to whether the user is a moderator or not. Set moderators in Community Builder Control Panel > Configuration > Moderation tab > Moderators View Access Level. When a user is a moderator, his profile fields do not get synced across to moodle when saving/editing his profile.

Edit: I've pinpoint it down further. Turning off CB Core Fields Ajax plugin fixes the bug.

Found the cause: If a profile field has Ajax editing enabled and is mapped across to moodle, any changes to the Joomla profile do not get mapped across.
Last edit: 5 years 7 months ago by Web Buster UK Ltd.

Please Log in or Create an account to join the conversation.

More
5 years 7 months ago #2 by Antonio Durán
Hi.

It makes sense, as CB will not trigger the "profile updated" event when you edit a field in Ajax. If you send me the ajax plugin I can check if it is triggering any new events.

Please Log in or Create an account to join the conversation.

  • Web Buster UK Ltd
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 years 7 months ago - 5 years 7 months ago #3 by Web Buster UK Ltd
I'll send it to your email Antonio.

The problem isn't just editing a field in Ajax, it wouldn't sync at all even when editing the profile in the backend. As in no data gets synced to Moodle if any of the mapped Joomla field has Ajax editing enabled for the user.

If the user does not have access to Ajax editing, their accounts get synced to Moodle with no issue both from frontend and backend (hence my initial finding that it only affects certain users, ie moderators).
Last edit: 5 years 7 months ago by Web Buster UK Ltd.

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago - 5 years 6 months ago #4 by Antonio Durán
Sorry for the slow reply. I checked the plugin and it is not providing any events to hook to, so there is no way to make data sync to Moodle when using it.

> The problem isn't just editing a field in Ajax, it wouldn't sync at all even when editing the profile in the backend. As in no data gets synced to Moodle if any of the mapped Joomla field has Ajax editing enabled for the user.

Then it means that CB is changing the way it works when some Ajax fields are enabled. You can try asking about that to CB developers, as I think it is easier for them to now why the UpdateUser event is not triggered the same way as when there are no Ajax fields.
Last edit: 5 years 6 months ago by Antonio Durán.

Please Log in or Create an account to join the conversation.