How To / General
Updating mapped user field
- Web Buster UK Ltd
-
Topic Author
- Offline
- Elite Member
-
Less
More
8 years 11 months ago #1
by Web Buster UK Ltd
Updating mapped user field was created by Web Buster UK Ltd
Is there a way to change when the mapped Moodle field gets updated? For example, on logging in Joomdle maps Joomla fields to Moodle fields. Or even clicking a button to trigger mapping.
Currently, the fields' values are transferred over to Moodle only when a user updates and saves his profile on Joomla. If he edits it via Ajax on his profile in Joomla, the values do not get mapped to Moodle.
The other situation where a custom Joomla field is generated via SQL (eg combining 2 other fields) which occurs after profile updates are saved, the updated values do not get mapped across to Moodle either.
Currently, the fields' values are transferred over to Moodle only when a user updates and saves his profile on Joomla. If he edits it via Ajax on his profile in Joomla, the values do not get mapped to Moodle.
The other situation where a custom Joomla field is generated via SQL (eg combining 2 other fields) which occurs after profile updates are saved, the updated values do not get mapped across to Moodle either.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7936
8 years 11 months ago #2
by Antonio Durán
Replied by Antonio Durán on topic Updating mapped user field
Moodle field is updated when Joomla field is changed. That normally happens when a user updates his profile.
> If he edits it via Ajax on his profile in Joomla, the values do not get mapped to Moodle.
Can you ellaborate? What do you mean with Ajax?
> The other situation where a custom Joomla field is generated via SQL (eg combining 2 other fields) which occurs after profile updates are saved, the updated values do not get mapped across to Moodle either.
How is this done? Is a plugin combining fields on profile updates?
> If he edits it via Ajax on his profile in Joomla, the values do not get mapped to Moodle.
Can you ellaborate? What do you mean with Ajax?
> The other situation where a custom Joomla field is generated via SQL (eg combining 2 other fields) which occurs after profile updates are saved, the updated values do not get mapped across to Moodle either.
How is this done? Is a plugin combining fields on profile updates?
Please Log in or Create an account to join the conversation.
- Web Buster UK Ltd
-
Topic Author
- Offline
- Elite Member
-
8 years 8 months ago #3
by Web Buster UK Ltd
Replied by Web Buster UK Ltd on topic Updating mapped user field
Sorry for the lack of clarification regarding this, it specifically involves Community Builder.
Community Builder allows a user to edit their profile using AJAX, without being redirected to the "Edit Profile" page. Basically they click on a field on their profile page, type in a new value, click save and the profile is updated (inline editing with jQuery AJAX). The issue was that when a user edits their profile this way, Joomdle does not pick up the new value to be mapped to Moodle.
Community Builder also allows us to use SQL to combine 2 other fields to generate a custom field, it is a built-in capability in CB. Thus if you edit the 2 other fields, the custom field will automatically be updated. Joomdle doesn't seem to map this new updated value to Moodle either.
This isn't really an issue, and we think it may not even be possible to map new values to Moodle when editing CB profile via this way.
Community Builder allows a user to edit their profile using AJAX, without being redirected to the "Edit Profile" page. Basically they click on a field on their profile page, type in a new value, click save and the profile is updated (inline editing with jQuery AJAX). The issue was that when a user edits their profile this way, Joomdle does not pick up the new value to be mapped to Moodle.
Community Builder also allows us to use SQL to combine 2 other fields to generate a custom field, it is a built-in capability in CB. Thus if you edit the 2 other fields, the custom field will automatically be updated. Joomdle doesn't seem to map this new updated value to Moodle either.
This isn't really an issue, and we think it may not even be possible to map new values to Moodle when editing CB profile via this way.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7936
8 years 8 months ago #4
by Antonio Durán
Replied by Antonio Durán on topic Updating mapped user field
Thanks for the additional info. I will do some testing and investigation when I can, and get back to you.
Most probably, CB is not firing the "user updated" event when you update profile via Ajax. That event is what Joomdle uses to know that it has to update profile in Moodle.
Most probably, CB is not firing the "user updated" event when you update profile via Ajax. That event is what Joomdle uses to know that it has to update profile in Moodle.
Please Log in or Create an account to join the conversation.