Feature Requests

Please do NOT use this section of the forum to request help if Joomdle does not work for you in some particular way. Your post will be deleted.

CB Moodle and full name sync

  • Ivan
  • Topic Author
  • New Member
  • New Member
More
13 years 3 months ago #1 by Ivan
CB <==> Moodle and full name sync was created by Ivan
We have a Joomla installation with Community Builder configured to use 3-part fullname (firstname,middlename,lastname).
When this information goes to moodle db, name splt in two pieces, one piece goes to moodle's firstname, other - in moodle's lastname (there is no middlename field in moodle DB (?)). When user name is being shown in moodle these parts are joined together.

The problem is that splitting logic is wrong and at the end, after moodle joins its first and last names we got weird mixture.

- Name in joomla DB loks like: John Fitzgerald Kennedy
CB correctly splits it into:
firstname:John
middlename: Fitzgerald
lastname: Kennedy

- After sync to moodle profile fields looks like
firstname: John
lastname: Fitzgerald Kennedy

And full name in rendered as Fitzgerald Kennedy John

It is probably better to split 3-part names as:

firstname: John Fitzgerald
lastname: Kennedy

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

  • Ivan
  • Topic Author
  • New Member
  • New Member
More
13 years 3 months ago #2 by Ivan
Replied by Ivan on topic CB <==> Moodle and full name sync
This post was supposed to go to R09 support, please move it

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

More
13 years 3 months ago #3 by Antonio Durán
Replied by Antonio Durán on topic CB <==> Moodle and full name sync
Hi.

As you say, there is no moodle middlename field.

Are you mapping first and lastname from CB to moodle? That should make you have moodle info wihou the middlename.

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

  • Ivan
  • Topic Author
  • New Member
  • New Member
More
13 years 3 months ago #4 by Ivan
Replied by Ivan on topic CB <==> Moodle and full name sync

Antonio Durán wrote: As you say, there is no moodle middlename field.


That is true. As a workaround people put middlename in 'firstname' field, I even sow moodle patch extending the length of that field in DB to fit longer strings



Antonio Durán wrote: Hi.
Are you mapping first and lastname from CB to moodle? That should make you have moodle info wihou the middlename.

In some countries/cultures middlename is important and not ommitable.

I personally found a workaround, i have an extra CB field where " firstname middlename" string (with the help of CB Auto Actions plugin) automatically copied to, and then this field is mapped to the firstname field of Moodle.

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

More
13 years 3 months ago #5 by Antonio Durán
Replied by Antonio Durán on topic CB <==> Moodle and full name sync
Great to know hat you found a workaround.


As for splitting the name 2 + 1: in Spain, for example, it would make more sense to have it 1+2 (as we have 2 surnames), so it is a difficult problem to solve.

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

  • Ivan
  • Topic Author
  • New Member
  • New Member
More
13 years 3 months ago #6 by Ivan
Replied by Ivan on topic CB <==> Moodle and full name sync
I see.
You might consider to make it configurable, which way to split full name into pieces.

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

More
13 years 3 months ago #7 by Antonio Durán
Replied by Antonio Durán on topic CB <==> Moodle and full name sync
Ok, I will move this to feature requests, in case it can be included.

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

More
11 years 10 months ago #8 by Irfan
Replied by Irfan on topic CB <==> Moodle and full name sync
Hi,

I see there is a column middlename in Moodle user table.I also have middlename in comprofiler table of CB.I wanted to map these two column but it does not seem possible because in Mapping I cannot see middlename in moodle fields dropdown.Is it possible to map these two fields?if yes,could you please help me how?


Thanks,

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

  • Ivan
  • Topic Author
  • New Member
  • New Member
More
11 years 10 months ago #9 by Ivan
Replied by Ivan on topic CB <==> Moodle and full name sync
As I just learned, Moodle has middlename starting from version 2.6
But we still use older version with no middlename field. To deal with it we used the trick I described above:

1. Have extra CB field for "firstname+middlename" combined, lets call ut cb_firstmiddlename. This field is hidden for users and updated automatically every time one of firstname and middlename fields are updated (you need CB Auto Actions plugin to forse this update).

2. Map this combined field cb_firstmiddlename to moodle name field

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

More
11 years 7 months ago #10 by Leopoldo Sanczyk
Replied by Leopoldo Sanczyk on topic CB <==> Moodle and full name sync
Can you guide me where to find the PHP file where the split happens? I'd like to edit it, to match only the last word in the name as the lastname, and let the rest of it in the firstname. I will submit the code change here when I find it. Thanks for your help!

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