Moodle

Have additional proflie fields allowed to be data mapped with auth plugins

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.8
  • Fix Version/s: None
  • Component/s: Authentication
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE

Description

Shane recently added the option allowing Admins to create custom user profile fields.

It would be very handy if once created, these fields could be data mapped with the various auth plugins (eg LDAP, external database, etc)

Issue Links

Activity

Hide
Howard Miller added a comment -

This would be useful... it is unfortunate that all the authentication plugins seem to handle data mapping (and the definition of same) independently.

Show
Howard Miller added a comment - This would be useful... it is unfortunate that all the authentication plugins seem to handle data mapping (and the definition of same) independently.
Hide
Shane Elliott added a comment -

Hi Howard, related issue is: MDL-16982

Show
Shane Elliott added a comment - Hi Howard, related issue is: MDL-16982
Hide
Howard Miller added a comment -

Noting that related issue is to sort this in 2.0, I have a requirement for this in 1.9. My idea is to simply have an option in each appropriate auth plugin to map the optional fields by the fields shortname (where there is a match). As the user is free to specify any short name they like this should sort it for most cases and does not require database changes.

Show
Howard Miller added a comment - Noting that related issue is to sort this in 2.0, I have a requirement for this in 1.9. My idea is to simply have an option in each appropriate auth plugin to map the optional fields by the fields shortname (where there is a match). As the user is free to specify any short name they like this should sort it for most cases and does not require database changes.
Hide
Thomas Hanley added a comment -

I would find this functionality particularly useful. I am working on a site to be used by teachers from several hundred UK schools. We will be using 'authentication by external database'. The big benefit of implementing this feature is that the information that schools have submitted to our external database can be seen / made use of within Moodle's user profiles. One of our aims is to build an online community. Customising the user fields, for example allowing schools to describe their context is very useful as this information is then shared amongst all school users. Allowing this to happen as a consequence of our registration process is also very beneficial. If we relied on schools to enhance their user profiles if they had the time or inclination to do so, would result in a significant number of profiles not being updated! This functionality would be very efficient and practical and I am sure would benefit users in different contexts to our specific context.

Show
Thomas Hanley added a comment - I would find this functionality particularly useful. I am working on a site to be used by teachers from several hundred UK schools. We will be using 'authentication by external database'. The big benefit of implementing this feature is that the information that schools have submitted to our external database can be seen / made use of within Moodle's user profiles. One of our aims is to build an online community. Customising the user fields, for example allowing schools to describe their context is very useful as this information is then shared amongst all school users. Allowing this to happen as a consequence of our registration process is also very beneficial. If we relied on schools to enhance their user profiles if they had the time or inclination to do so, would result in a significant number of profiles not being updated! This functionality would be very efficient and practical and I am sure would benefit users in different contexts to our specific context.
Hide
Howard Miller added a comment -

It appears that this is a "fixed in 2.0" issue therefore reassigning.

Show
Howard Miller added a comment - It appears that this is a "fixed in 2.0" issue therefore reassigning.
Hide
Olav Jordan added a comment -

I'm not quite sure about proper procedure for this so I'm just going to explain..
I'm linking this issues to MDL-16764 because the patch I made requires Hubert's patch profile_field_menu2.patch in that issues to for mine to work properly

Show
Olav Jordan added a comment - I'm not quite sure about proper procedure for this so I'm just going to explain.. I'm linking this issues to MDL-16764 because the patch I made requires Hubert's patch profile_field_menu2.patch in that issues to for mine to work properly
Hide
Olav Jordan added a comment -

patch2.patch (13 kB)
will map users custom profile fields to LDAP
applying the mapping is done (once a custom field is created) in the users->authentication->LDAP server menu at the bottom and both update external and internal work

Show
Olav Jordan added a comment - patch2.patch (13 kB) will map users custom profile fields to LDAP applying the mapping is done (once a custom field is created) in the users->authentication->LDAP server menu at the bottom and both update external and internal work
Hide
Pawel Suwinski added a comment -

Hi, Olav I am manually adding your patch to my 1.9.5 moodle instance.

Does it should be in line 191:

$ldapvalue = empty($user_entry[$ldapkey][0])? null: $user_entry[$ldapkey][0];

rather than:

$ldapvalue = empty($user_entry[$ldapkey][0])? null: $ldapvalue;

?

Show
Pawel Suwinski added a comment - Hi, Olav I am manually adding your patch to my 1.9.5 moodle instance. Does it should be in line 191:
$ldapvalue = empty($user_entry[$ldapkey][0])? null: $user_entry[$ldapkey][0];
rather than:
$ldapvalue = empty($user_entry[$ldapkey][0])? null: $ldapvalue;
?
Hide
Pawel Suwinski added a comment -

I added more compact and strongly refactored patch suited for 1.9.5 version.

Show
Pawel Suwinski added a comment - I added more compact and strongly refactored patch suited for 1.9.5 version.

People

Dates

  • Created:
    Updated: