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

Error editing profile when a profile field is locked

    XMLWordPrintable

Details

    • MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE
    • MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE
    • MDL-52260-master-2
    • Hide

      Note for the tester: Hi, please, don't hesitate to talk with John about this issue testing and ensure you can reproduce the problem without the patch, it is important that we don't cause a new regression.

      1. Setup 5 custom profile fields. One of each type, 2 locked, 3 not. Only use text input because other types are broken MDL-52175
      2. Setup moodle to use authentication with external DB (or LDAP, maybe others).
      3. Setup auth module to take profile fields from external DB source.
      4. Create a user in that authentication method. Save values in each of the profile fields
      5. Create another user in that authentication method. Don't give it any values
      6. Setup auth module to block editing of two fields (one that was locked by custom profile fields, and one that was not)
      7. Fields locked by either external db auth or by the custom profile field setup should be read-only for a user who tries to edit their profile. But the other should be editible
      8. Lock some (not user profile) fields that same auth type
      9. Login as the first student
      10. Make sure you can still save and edit your profile
      11. Login as the second student
      12. Make sure you can still save and edit your profile
      13. Login as a manually created student. Set their country to "Select a country"
      14. Login as admin
      15. Lock country and description fields on manual auth (Site administration ► Plugins ► Authentication ► Manual accounts)
      16. Login as a manually created student.
      17. Make sure you can still save and edit your profile
      18. Login as admin and unlock the country box again
      19. Login as a manually created student. Set their country (e.g. Australia)
      20. Login as admin and lock the country box again
      21. Login as a manually created student.
      22. Make sure you can still save and edit your profile
      Show
      Note for the tester: Hi, please, don't hesitate to talk with John about this issue testing and ensure you can reproduce the problem without the patch, it is important that we don't cause a new regression. Setup 5 custom profile fields. One of each type, 2 locked, 3 not. Only use text input because other types are broken MDL-52175 Setup moodle to use authentication with external DB (or LDAP, maybe others). Setup auth module to take profile fields from external DB source. Create a user in that authentication method. Save values in each of the profile fields Create another user in that authentication method. Don't give it any values Setup auth module to block editing of two fields (one that was locked by custom profile fields, and one that was not) Fields locked by either external db auth or by the custom profile field setup should be read-only for a user who tries to edit their profile. But the other should be editible Lock some (not user profile) fields that same auth type Login as the first student Make sure you can still save and edit your profile Login as the second student Make sure you can still save and edit your profile Login as a manually created student. Set their country to "Select a country" Login as admin Lock country and description fields on manual auth (Site administration ► Plugins ► Authentication ► Manual accounts) Login as a manually created student. Make sure you can still save and edit your profile Login as admin and unlock the country box again Login as a manually created student. Set their country (e.g. Australia) Login as admin and lock the country box again Login as a manually created student. Make sure you can still save and edit your profile
    • 3.1 Stable Sprint 1

    Description

      When a profile field is locked, when a user tries to edit/save their profile an error occurs
      Debug info: ERROR: value too long for type character varying(2)
      OR
      Debug info: ERROR: null value in column "country" violates not-null constraint

      Reproduction steps:
      As Admin user
      Lock a profile field for manual auth plugin (e.g. country)
      As a regular user try to edit/save your profile
      What occurs: Error
      Expected: No Error

      Attachments

        Issue Links

          Activity

            People

              johno John Okely
              berserkk Ben Kelada
              Simey Lameze Simey Lameze
              David Monllaó David Monllaó
              Jun Pataleta Jun Pataleta
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                21/Dec/15