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

Caching issue in user profile field conditions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Conditional activities
    • Labels:
      None
    • Testing Instructions:
      Hide

      Test one:

      1. Log in as admin/teacher
      2. Create a menu profile field and set options as 1,2,3,4
      3. Edit an activity and set the condition so that it is visible if the menu field contains 3
      4. Login as student and make sure the activity is not available.
      5. Goto your profile and set the menu field to 3
      6. Return to course and activity is still not available.
      7. Logout and log back in, now you should be able to access the activity.

      Test two:

      1. Log in as an admin
      2. Create a new Menu profile field with the following details:
        • Shortname: favouritecolour
        • Name: What is your favourite colour?
        • Required: Yes
        • Display on signup page: Yes
        • Options: Undecided, Red, Green, Blue, Yellow, Orange, Pink, Purple, Magenta, Cyan, Turquoise, Brown
        • Default: Undecided
      3. Browse to a course
      4. Add a forum activity called what ever you want and add the following condition:
        • User field: What is your favourite colour?
        • doesn't contain
        • Undecided
      5. Save the forum and log out.
      6. Log in as a student of the course.
      7. Browse to the course.
      8. Confirm: The activity is shown as available.
      9. Go to the page to edit your profile
      10. Click the save button without making any changes
      11. Browse back to the course.
      12. Confirm: The activity is now shown as greyed out.
      Show
      Test one: Log in as admin/teacher Create a menu profile field and set options as 1,2,3,4 Edit an activity and set the condition so that it is visible if the menu field contains 3 Login as student and make sure the activity is not available. Goto your profile and set the menu field to 3 Return to course and activity is still not available. Logout and log back in, now you should be able to access the activity. Test two: Log in as an admin Create a new Menu profile field with the following details: Shortname: favouritecolour Name: What is your favourite colour? Required: Yes Display on signup page: Yes Options: Undecided, Red, Green, Blue, Yellow, Orange, Pink, Purple, Magenta, Cyan, Turquoise, Brown Default: Undecided Browse to a course Add a forum activity called what ever you want and add the following condition: User field: What is your favourite colour? doesn't contain Undecided Save the forum and log out. Log in as a student of the course. Browse to the course. Confirm: The activity is shown as available. Go to the page to edit your profile Click the save button without making any changes Browse back to the course. Confirm: The activity is now shown as greyed out.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      wip-MDL-34286-m24

      Description

      There is a caching issue when using user profile field conditions.

      • Log in as an admin
      • Add a condition to an activity that involves the user setting a checkbox (make sure they havn't set it already).
      • Log in as the student browse to the course and confirm the activity is not available.
      • Edit your profile and check the checkbox.
      • Browse back to the course.
      • Notice the activity is still unavailable... caching issue.

      Should be simple to fix, details on MDL-29538

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    3/Dec/12