Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-24443

Merge Users: Add functionality to Moodle that allows site admins to merge two user profiles.

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.8.1
    • Fix Version/s: BACKEND
    • Component/s: Administration
    • Labels:
    • Environment:
      In my case it's MSSQL 2005, IIS 6 and Windows Server 2003, but it's really a platform independant issue.

      Description

      I use Moodle in a corporate training environment and, as a site admin, I have a need to be able to merge two student records in Moodle. Our users are authenticated against Active Directory and when they login Moodle authenticates them against Active Directory and then checks if they are already registered as users on Moodle. If they are, then they are logged in. If not, Moodle pulls their user info off Active Directory and creates a new account for that username. This all works beautifully.

      However, due to business processes and rules that are outside of our control, we sometimes have a situation where the same user gets registered on Moodle with two different usernames - the result being a duplicate record. Example, a user might change jobs or transfer to a different division. Alternatively, he might resign but then be re-hired sometime later. In each of these cases the user will most likely be given a new username on Active Directory (one of those things that are out of our control) by the HR department when they go through the whole HR recruitment or transfer process.

      The result is that when this user goes on training again in his new position and tries to access Moodle with his NEW Active Directory username Moodle sees him as a new user and creates a new record for him. Obviously, all his old activity is still linked to his OLD username on Moodle. The course and activity data linked to his old username doesn't pull through to the new username because Moodle doesn't know that the two user records are related.

      An ideal solution would be to have a function in Moodle where the site admin could merge the old username with the new username and all the activity from the old username would be transferred to the new username. The old record would then be deleted.

      Over the last few years the Moodle community has developed their own scripts to solve this problem - so there's clearly a need. Quite a few of these scripts are shared on the http://moodle.org/mod/forum/discuss.php?d=103425 thread on the Using Moodle forum. However, running these unofficial scripts can be risky as merging records in Moodle seems to be quite an involved process, so we need a solution that's been fully tested on all the operating system and database platforms that Moodle supports. None of these community solutions are platform independent. Example, I haven't been able to get any of them to run on a MSSQL database. So, unless I hire a programmer to develop a MSSQL script for me, I'm stuck. I'd much rather have an official merge function built into Moodle than having to rely on third-party scripts.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                70 Vote for this issue
                Watchers:
                43 Start watching this issue

                Dates

                • Created:
                  Updated: