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

Restrict access of activity via User Profile by Admin doesn't get updated

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_39_STABLE

      Description

      Restrict access of activity using User Profile field doesn't work/get updated when the Admin user changes the User Profile field, it seems it only works when the user logs out or update his profile himself.

      Basically, if Admin user changes a student profile field which is used to restrict an activity access the update doesn't take effect, at least until the student user updates his profile or logs out.

        

      How to replicate the issue with an example:

      Admin user: admin

      Student user: John

      User Profile custom field: Subscription = Active / Inactive (Dropdown)

      Activity: Lesson 1

       

      Example 1

      John > User Profile > Subscription = Active 

      "Lesson 1" activity > Restrict access is set to > "User profile field" "Subscription" is equal to "Active"

      Result: "Lesson 1" is available for John

      OK

       

      Now Admin user changes John profile field > Subscription = Inactive 

      Result: "Lesson 1" still available for John when it should be Hidden

      Not OK

       

      If the user (John) logs out and log in again or he updates his profile himself "Lesson 1" becomes hidden again

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            berriop Pedro Be
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Barbara Ramiro, Bas Brands, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: