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

User fields: new PROFILE_VISIBLE_TEACHERS constant not supported

    XMLWordPrintable

Details

    • MOODLE_311_STABLE
    • MOODLE_311_STABLE
    • MDL-71559-m311
    • MDL-71559-master
    • Hide
      1. Ensure that the debugging and debug display options are enabled
      2. Create a 'text input' profile field with max length < 255 using the 'Visible to user, teachers and admins' option.
      3. Select this using the 'show user identity' option (Users / Permissions / User policies).
      4. Look at the participants page for a course
        • EXPECTED: PHP warnings like the below should not display:

      Notice: Undefined variable: allowed in [my moodle path]\user\classes\fields.php on line 389

      Show
      Ensure that the debugging and debug display options are enabled Create a 'text input' profile field with max length < 255 using the 'Visible to user, teachers and admins' option. Select this using the 'show user identity' option (Users / Permissions / User policies). Look at the participants page for a course EXPECTED: PHP warnings like the below should not display: Notice: Undefined variable: allowed in [my moodle path] \user\classes\fields.php on line 389

    Description

      The new PROFILE_VISIBLE_TEACHERS constant was added recently (MDL-28452). This constant is not supported in the new \core_user\fields API.

      To reproduce:

      1. Create a 'text input' profile field with max length < 255 using the 'visible to teachers' option.
      2. Select this using the 'show user identity' option (Users / Permissions / User policies).
      3. Look at the participants page for a course

      You then get PHP warnings:

      Notice: Undefined variable: allowed in [my moodle path]\user\classes\fields.php on line 389

      Attachments

        Activity

          People

            quen Sam Marshall
            quen Sam Marshall
            Katie Ransom Katie Ransom
            Andrew Lyons Andrew Lyons
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              12/Jul/21

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 40 minutes
                1h 40m