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

should use constants instead of integers for "maildisplay"

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.0.2
    • General
    • Any
    • MOODLE_20_STABLE
    • Easy

      On user profiles the maildisplay property always using straight integers. For example

      if ($user->maildisplay == 2 && is_enrolled($context, $user))

      This makes the code unnecessarily hard to read. Constants should be used.

      The values are:
      0 hide my email address
      1 allow everyone to see my email address
      2 only allow other users in a course with me to see my email address

            moodle.com Moodle HQ
            andyjdavis Andrew Davis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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