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

Remove MESSAGE_DISALLOWED, MESSAGE_PERMITTED, MESSAGE_FORCED constants and replace for a simpler list

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Future Dev
    • Messages

      MESSAGE_DISALLOWED, MESSAGE_PERMITTED, MESSAGE_FORCED constants are currently used on db/message.php while declaring message providers.

      Example:

      $messageproviders = [
          'contactdataprotectionofficer' => [
              'defaults' => [
                  'popup' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
                  'email' => MESSAGE_PERMITTED + MESSAGE_DEFAULT_ENABLED,
              ],
              'capability'  => 'tool/dataprivacy:managedatarequests'
          ]
       
       ....
      

      Previous to this issue, the definition was:
      MESSAGE_PERMITTED + MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF

      This is a bitwise combination to reach all possibilities:
      ENABLED: Will enable the provider by default.
      PERMITTED: will let the user decide to enable or disable
      DISALLOWED: Will block the use from changing the setting and disable it.
      FORCED: Will block the use from changing the setting and enable it.

      This does not make sense anymore, since having only one "enabled" setting DISALLOWED implies not ENABLED and FORCED implies ENABLED, while permitted is already implicit if not DISALLOWED or not FORCED...

      IMO only two options are needed right now.

      ENABLED (not using it will mean disabled).
      FORCED (will mix with ENABLED or not... and not using it will mean permitted).

      The problem here is to make something backward compatible. Probably creating something apart with a new system.

       

            Unassigned Unassigned
            pferre22 Pau Ferrer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

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