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

    • MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE
    • 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.

    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

            ikawhero Shane Elliott
            ikawhero Shane Elliott
            Mark Nelson Mark Nelson
            Sam Hemelryk Sam Hemelryk
            Ankit Agarwal Ankit Agarwal
            Sam Marshall, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9/Sep/13