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

User fields: new PROFILE_VISIBLE_TEACHERS constant not supported

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_311_STABLE
    • Fixed Branches:
      MOODLE_311_STABLE
    • Pull 3.11 Branch:
      MDL-71559-m311
    • Pull Master Branch:
      MDL-71559-master
    • Testing Instructions:
      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

            Assignee:
            quen Sam Marshall
            Reporter:
            quen Sam Marshall
            Peer reviewer:
            Katie Ransom Katie Ransom
            Integrator:
            Andrew Lyons Andrew Lyons
            Tester:
            Anna Carissa Sadia Anna Carissa Sadia
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              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