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

Custom user fields used to restrict access incorrectly using get_string for field name

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      1. Make sure conditional activities is switched on in advanced settings.
      2. Set up a custom profile field eg "asdf 001".
      3. Set up an activity/resource in a course.
      4. Restrict access based on the custom user profile field eg "asdf 001" contains "bla".
      5. Save and return to course.
      6. Ensure the condition information does not include an incorrect reference to [[asdf 001]] and the name is displayed correctly.

      Show
      1. Make sure conditional activities is switched on in advanced settings. 2. Set up a custom profile field eg "asdf 001". 3. Set up an activity/resource in a course. 4. Restrict access based on the custom user profile field eg "asdf 001" contains "bla". 5. Save and return to course. 6. Ensure the condition information does not include an incorrect reference to [ [asdf 001] ] and the name is displayed correctly.
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE

      Description

      1. Make sure conditional activities is switched on in advanced settings;
      2. Set up a custom profile field eg "asdf 001";
      3. Set up an activity/resource in a course;
      4. Restrict access based on the custom user profile field eg "asdf 001" contains "bla"
      5. Save and return to course.
      6. The condition information will include an incorrect reference to [[asdf 001]]

      Code should use API to retrieve field name from the user_info_field table, not a call to get_string()

        Attachments

          Activity

            People

            Assignee:
            ikawhero Shane Elliott
            Reporter:
            ikawhero Shane Elliott
            Peer reviewer:
            Mark Nelson
            Integrator:
            Sam Hemelryk
            Tester:
            Ankit Agarwal
            Participants:
            Component watchers:
            Sam Marshall, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/Sep/13