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

Conditional availability: Custom user field restriction not selected on form

XMLWordPrintable

    • MOODLE_27_STABLE
    • MOODLE_27_STABLE
    • MDL-45478-master
    • Hide

      Run Behat tests --tags=availability_profile

      or

      0. Ensure you have availability enabled sitewide, and a custom user field (if not, add one).
      1. Edit any activity. Under 'Restrict access', choose 'Add restriction' and select Profile.
      2. Select the custom user field. Make appropriate choices for the other dropdowns, e.g. 'not empty', then save settings.
      3. Edit activity again and expand 'Restrict access'.

      EXPECTED: The settings you made before are still shown.

      Show
      Run Behat tests --tags=availability_profile or 0. Ensure you have availability enabled sitewide, and a custom user field (if not, add one). 1. Edit any activity. Under 'Restrict access', choose 'Add restriction' and select Profile. 2. Select the custom user field. Make appropriate choices for the other dropdowns, e.g. 'not empty', then save settings. 3. Edit activity again and expand 'Restrict access'. EXPECTED: The settings you made before are still shown.

      When you set a restriction on a custom user field, this works correctly. However if you then edit settings again for the activity (or section), the dropdown with the field name is not correctly set up (it's still in the 'choose a field' state.)

      This applies only to custom fields. I've found the problem and it's a one-character error, but I'm going to add a Behat test anyhow that covers this situation, as it is a UI form problem and since this came up, we might as well have something to verify that the form fields are correctly re-initialised when editing in this case (also to test with custom fields in general as the existing test only uses standard fields).

            quen Sam Marshall
            quen Sam Marshall
            Frédéric Massart Frédéric Massart
            Marina Glancy Marina Glancy
            Ankit Agarwal Ankit Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.