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

Convert user profile fields for messaging/networking into custom profile fields

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Test the upgrader steps

      1. Create a new Moodle instance that does not have this patch installed
      2. Turn on developer mode
      3. Copy the attached file ‘usersocialdata.php’ to ‘/user/profile/field/social/‘
      4. Run this command php user/profile/field/social/usersocialdata.php This will generate about 500 users with the data in the columns ICQ number, Skype id etc.
      5. Login to Moodle and visit the profile page of one of the new test users
      6. verify you see the fields icq, skype etc. in the User details section
      7. Install this patch and run the upgrader
      8. Visit the page of the test user again
      9. verify you still see the same fields: i ICQ number, Skype id etc. in the User details section.
      10. verify only the Skype, ICQ and url fields have links, the other should just display the user data without a link.

      Test the social profile field

      1. This test needs to be done after completing the previous test
      2. Navigate to Site admin > Users > User profile fields
      3. Verify you see the all social profile fields listed
      4. Click the cog icon in row Skype ID
      5. Verify in the select input “Social provider” Skype ID is selected
      6. Change on of the settings, for example “Display on startup page”
      7. Save changes
      8. Click the cog icon in row Skype ID again
      9. Verify the changes persist
      10. Now change the value Skype ID to Yahoo ID in the select input “Social provider” and save changes
      11. Verify the form is not saved and the select input is highlighted and showing message “Social network has already been added”
      12. Cancel the form
      13. Click the delete icon for profile field Yahoo ID
      14. Verify you can delete the profile field

      Test the translations

      1. This test needs to be done after completing the previous test
      2. As the administrator Install the french language pack
      3. Navigate to a test user profile page
      4. Change the site language to French
      5. Verify the social profile fields are now displayed in French “Identifiant ICQ, Identifiant Skype etc”
      Show
      Test the upgrader steps Create a new Moodle instance that does not have this patch installed Turn on developer mode Copy the attached file ‘usersocialdata.php’ to ‘/user/profile/field/social/‘ Run this command php user/profile/field/social/usersocialdata.php This will generate about 500 users with the data in the columns ICQ number, Skype id etc. Login to Moodle and visit the profile page of one of the new test users verify you see the fields icq, skype etc. in the User details section Install this patch and run the upgrader Visit the page of the test user again verify you still see the same fields: i ICQ number, Skype id etc. in the User details section. verify only the Skype, ICQ and url fields have links, the other should just display the user data without a link. Test the social profile field This test needs to be done after completing the previous test Navigate to Site admin > Users > User profile fields Verify you see the all social profile fields listed Click the cog icon in row Skype ID Verify in the select input “Social provider” Skype ID is selected Change on of the settings, for example “Display on startup page” Save changes Click the cog icon in row Skype ID again Verify the changes persist Now change the value Skype ID to Yahoo ID in the select input “Social provider” and save changes Verify the form is not saved and the select input is highlighted and showing message “Social network has already been added” Cancel the form Click the delete icon for profile field Yahoo ID Verify you can delete the profile field Test the translations This test needs to be done after completing the previous test As the administrator Install the french language pack Navigate to a test user profile page Change the site language to French Verify the social profile fields are now displayed in French “Identifiant ICQ, Identifiant Skype etc”
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_27_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_310_STABLE, MOODLE_31_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-28452-master

      Description

      These fields are pretty easy to convert during an upgrade.

      1) Create a new user custom field. If it's not possible to replicate the full functionality using a text field type (eg note that Skype can show an online/offline icon) then you will have to create a special new user profile field type as a new plugin.
      2) Copy existing data into this new field.
      3) Drop old column from the user table.
      4) Make sure that all code no longer relies on this field.
      5) Make sure that all code that provides user data (eg web services) behaves as expected and APIs are not changed.

      Fields include:

      • Web URL
      • ICQ
      • Skype
      • AIM
      • Yahoo
      • MSN

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              basbrands Bas Brands
              Reporter:
              dougiamas Martin Dougiamas
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              27 Vote for this issue
              Watchers:
              33 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 days
                  3d