How To / General
Character limit for user fields when syncing to moodle
- Web Buster UK Ltd
-
Topic Author
- Offline
- Elite Member
-
Less
More
3 years 7 months ago #1
by Web Buster UK Ltd
Character limit for user fields when syncing to moodle was created by Web Buster UK Ltd
Hi Antonio, we are encountering an issue with the character limit. Basically we have a custom field on Joomla, which is synced across to moodle's department field.
We have increased the character limit in the SQL table for the department field, and Joomla's custom field does not have a limit. However it seems when it syncs across, it hits a 255 character limit so the whole data is not synced to moodle.
Is there a way to lift this hard limit? We are using moodle's department field as data to put the user into multiple cohorts.
We have increased the character limit in the SQL table for the department field, and Joomla's custom field does not have a limit. However it seems when it syncs across, it hits a 255 character limit so the whole data is not synced to moodle.
Is there a way to lift this hard limit? We are using moodle's department field as data to put the user into multiple cohorts.
Please Log in or Create an account to join the conversation.
- Web Buster UK Ltd
-
Topic Author
- Offline
- Elite Member
-
3 years 7 months ago - 3 years 7 months ago #2
by Web Buster UK Ltd
Replied by Web Buster UK Ltd on topic Character limit for user fields when syncing to moodle
Tried to use a custom moodle profile field to sync to instead, but Joomdle doesn't seem to be syncing it. Can't figure out what seems to be the problem
Joomla CB field (checkboxes) to Moodle department field -> syncs correctly
Joomla CB field (dropdown) to Moodle custom field (dropdown) -> syncs correctly
Joomla CB field (checkboxes) to Moodle custom field (text) -> doesn't sync
Joomla CB field (dropdown) to Moodle custom field (text) -> doesn't sync
Joomla CB field (text) to Moodle custom field (text) -> doesn't sync
Joomla CB field (text) to Moodle custom field (dropdown) -> doesn't sync
Is there a problem syncing?
Joomla CB field (checkboxes) to Moodle department field -> syncs correctly
Joomla CB field (dropdown) to Moodle custom field (dropdown) -> syncs correctly
Joomla CB field (checkboxes) to Moodle custom field (text) -> doesn't sync
Joomla CB field (dropdown) to Moodle custom field (text) -> doesn't sync
Joomla CB field (text) to Moodle custom field (text) -> doesn't sync
Joomla CB field (text) to Moodle custom field (dropdown) -> doesn't sync
Is there a problem syncing?
Last edit: 3 years 7 months ago by Web Buster UK Ltd.
Please Log in or Create an account to join the conversation.
- Web Buster UK Ltd
-
Topic Author
- Offline
- Elite Member
-
3 years 7 months ago #3
by Web Buster UK Ltd
Replied by Web Buster UK Ltd on topic Character limit for user fields when syncing to moodle
Found the issue!
It seems that one of our CB field was disabled, but was still mapped to a field in moodle. That seems to throw the whole sync process haywire.
Re-enabled that particular CB field and everything is now syncing fine.
It seems that one of our CB field was disabled, but was still mapped to a field in moodle. That seems to throw the whole sync process haywire.
Re-enabled that particular CB field and everything is now syncing fine.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7926
3 years 7 months ago #4
by Antonio Durán
Replied by Antonio Durán on topic Character limit for user fields when syncing to moodle
Hi.
I am glad to know that you managed to get it working.
If I understand it correctly, it was not finally related to the size, right?
I will try to replicate the problem with the unpublished field, to see if there's something we can do to avoid the problem you had.
I am glad to know that you managed to get it working.
If I understand it correctly, it was not finally related to the size, right?
I will try to replicate the problem with the unpublished field, to see if there's something we can do to avoid the problem you had.
Please Log in or Create an account to join the conversation.
- Web Buster UK Ltd
-
Topic Author
- Offline
- Elite Member
-
3 years 7 months ago - 3 years 7 months ago #5
by Web Buster UK Ltd
Replied by Web Buster UK Ltd on topic Character limit for user fields when syncing to moodle
Moodle has a hard limit of 255 characters on their default profile fields. We were trying to map profile field longer than 255 characters onto moodle's "department" field, which doesn't work as the strings were trimmed down to 255 chars.
Fortunately moodle's custom profile fields can be set to more than 255 characters, which is what we ultimately map our profile field to in.
The cause of our problem appears to be that if you create a mapping (Community Builder field > Moodle field), then unpublish the CB field, the mapping seems to fail erratically.
Fortunately moodle's custom profile fields can be set to more than 255 characters, which is what we ultimately map our profile field to in.
The cause of our problem appears to be that if you create a mapping (Community Builder field > Moodle field), then unpublish the CB field, the mapping seems to fail erratically.
Last edit: 3 years 7 months ago by Web Buster UK Ltd.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7926
3 years 6 months ago #6
by Antonio Durán
Replied by Antonio Durán on topic Character limit for user fields when syncing to moodle
I have released a new version, adding code to skip unpublished fields. I think that should fix the problem you experienced. Please test and let me know.
Please Log in or Create an account to join the conversation.