- Posts: 44
How to prevent name synchronization?
- adamtong
- Topic Author
- Offline
- Senior Member
-
Less
More
14 years 3 months ago #1
by adamtong
How to prevent name synchronization? was created by adamtong
For better management of students in my school. my school will set the real name and student photos in moodle. However, in Jomsocial, we allow students to change their name as nick name and their profile pictures. I know how to stop profile picture synchronization. But I have not yet figured out how to stop name synchronization.
Is it possible that the students decide their nicknames in jomsocial/joomla while their real names in Moodle (imported by CVS in bulk user upload) keep unchanged?
Thank you in advance.
Is it possible that the students decide their nicknames in jomsocial/joomla while their real names in Moodle (imported by CVS in bulk user upload) keep unchanged?
Thank you in advance.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7926
14 years 3 months ago #2
by Antonio Durán
Replied by Antonio Durán on topic Re: How to prevent name synchronization?
This is a strange request 
I think this is not possible at the moment, although you could modify joomdle code to get it.
Supposing you are using Jomsocial, I think it is enough to edit administrator/components/com_joomdle/helpers/mappings.php, function get_user_info_jomsocial(), and comment out these lines:
$user_info = JoomdleHelperMappings::get_firstname ($user->name);
$user_info = JoomdleHelperMappings::get_lastname ($user->name);
I have not tested, but I think that will leave Moodle first and lastname untouched.
I think this is not possible at the moment, although you could modify joomdle code to get it.
Supposing you are using Jomsocial, I think it is enough to edit administrator/components/com_joomdle/helpers/mappings.php, function get_user_info_jomsocial(), and comment out these lines:
$user_info = JoomdleHelperMappings::get_firstname ($user->name);
$user_info = JoomdleHelperMappings::get_lastname ($user->name);
I have not tested, but I think that will leave Moodle first and lastname untouched.
Please Log in or Create an account to join the conversation.
- adamtong
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 44
14 years 3 months ago #3
by adamtong
Replied by adamtong on topic Re: How to prevent name synchronization?
Thank you very much.
I will test it.
I will test it.
Please Log in or Create an account to join the conversation.
- adamtong
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 44
14 years 3 months ago #4
by adamtong
Replied by adamtong on topic Re: How to prevent name synchronization?
Hi. Thank you so much. I just tested it and it works.
However, when i change the name in Jomsocial, it will show an error :
Unknown column 'Array' in 'field list' SQL=INSERT INTO `qcbda_user_usergroup_map` (`user_id`,`group_id`) VALUES (46, Array)
How to get rid of the above error message?
Thanks again.
However, when i change the name in Jomsocial, it will show an error :
Unknown column 'Array' in 'field list' SQL=INSERT INTO `qcbda_user_usergroup_map` (`user_id`,`group_id`) VALUES (46, Array)
How to get rid of the above error message?
Thanks again.
Please Log in or Create an account to join the conversation.
- Chris
-
- Offline
- Moderator
-
14 years 3 months ago #5
by Chris
Replied by Chris on topic Re: How to prevent name synchronization?
The other possibility - perhaps no coding, it to create new Jomsocial fields, say nickname.
Syncronise the Moodle fields to Jomsocial as normal but hide these fields in Jomsocial's configuration. Instead show the new nickname field.
Syncronise the Moodle fields to Jomsocial as normal but hide these fields in Jomsocial's configuration. Instead show the new nickname field.
Please Log in or Create an account to join the conversation.
- adamtong
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 44
14 years 3 months ago #6
by adamtong
Replied by adamtong on topic Re: How to prevent name synchronization?
Although it maybe a good solution, my site is not a new site and many users has their names in Jomsocial already.
Also, I am not suer whether the new field "nickname" can be shown in jomsocial profile page.
Anyway, thank you so much for your help.
Also, I am not suer whether the new field "nickname" can be shown in jomsocial profile page.
Anyway, thank you so much for your help.
Please Log in or Create an account to join the conversation.
- Chris
-
- Offline
- Moderator
-
14 years 3 months ago #7
by Chris
Replied by Chris on topic Re: How to prevent name synchronization?
A new field (since it would be a jomsocial field) would be shown on the jomsocial profile page.
Personally, with your additional information, I would use new fields, hide the user name fields that you do not want shown and then use a tool like profile completeness to 'force' users to enter their nickname. You could always give them an on screen message indicating that there name is not in use on the site and instead new nicknames are required.
My two cents anyway
Personally, with your additional information, I would use new fields, hide the user name fields that you do not want shown and then use a tool like profile completeness to 'force' users to enter their nickname. You could always give them an on screen message indicating that there name is not in use on the site and instead new nicknames are required.
My two cents anyway
Please Log in or Create an account to join the conversation.
- adamtong
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 44
14 years 3 months ago #8
by adamtong
Replied by adamtong on topic Re: How to prevent name synchronization?
but how about in activity stream? Can the new nickname filed shown in there?
Please Log in or Create an account to join the conversation.
- Chris
-
- Offline
- Moderator
-
14 years 3 months ago #9
by Chris
Replied by Chris on topic Re: How to prevent name synchronization?
OK good point. So that would be a simple hack in jomsocial, perhaps using template overrides - I cannot remember if we can override the fields in stream or whether you need to hack the view. The last time I hacked the stream I updated the default view.
So the question because which component to hack
This is something you would need to consider based on your level of knowledge and amount of work.
I think perhaps, without much thought or investigation, you may want to do as Antonio has suggested because perhaps there are other places the name is used. Perhaps you open up kunena, a blogging or even a comments tool. Even in Jomsocial, there will be tool tips, modules, groups, etc. all designed to use the user name rather than the nickname.
So the question because which component to hack
I think perhaps, without much thought or investigation, you may want to do as Antonio has suggested because perhaps there are other places the name is used. Perhaps you open up kunena, a blogging or even a comments tool. Even in Jomsocial, there will be tool tips, modules, groups, etc. all designed to use the user name rather than the nickname.
Please Log in or Create an account to join the conversation.