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

Change background color of tool_capability table

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      • Purge all caches
      • Choose a capability (e.g. enrol/self:unenrolself )
      • Edit the roles definitions for various roles (Site admin > Users > Permissions > Define roles), clicking on 'Show advanced'.
        • Make sure at least one role has 'enrol/self:unenrolself' set to 'Not set'; one has it set to 'Allow'; one has it set to 'Prevent' and one has it set to 'Prohibit'
        • e.g. Role 'Student' - 'enrol/self:unenrolself' = 'Allow'; 'Teacher' = 'Prohibit'; 'Course creator' = 'Prevent'; 'Manager' = 'Not set'
      • After saving these definitions, visit 'Site admin > Users > Permissions > Capability overview'
      • Select the relevant capability (e.g. enrol/self:unenrolself)
      • Press 'Get the overview'
      • Check that the capabilities are displayed as expected (i.e. 'Not set' = white background + grey text; 'Allow' = green background + white text; 'Prevent' = orange background + white text; 'Prohibit' = red background + white text).
      Show
      Purge all caches Choose a capability (e.g. enrol/self:unenrolself ) Edit the roles definitions for various roles (Site admin > Users > Permissions > Define roles), clicking on 'Show advanced'. Make sure at least one role has 'enrol/self:unenrolself' set to 'Not set'; one has it set to 'Allow'; one has it set to 'Prevent' and one has it set to 'Prohibit' e.g. Role 'Student' - 'enrol/self:unenrolself' = 'Allow'; 'Teacher' = 'Prohibit'; 'Course creator' = 'Prevent'; 'Manager' = 'Not set' After saving these definitions, visit 'Site admin > Users > Permissions > Capability overview' Select the relevant capability (e.g. enrol/self:unenrolself) Press 'Get the overview' Check that the capabilities are displayed as expected (i.e. 'Not set' = white background + grey text; 'Allow' = green background + white text; 'Prevent' = orange background + white text; 'Prohibit' = red background + white text).
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-48439-change-background-colour-of-tool_capability-table

      Description

      When displaying a huge amount of roles and / or capabilities, the table on /admin/tool/capability/ gets pretty unclear. You will see many "Not set" cells, but can't see at a glance which role has a capability defined and which role has not.

      The legacy plugin https://moodle.org/plugins/view.php?plugin=report_rolescapabilities of Daniel Neis had a better way of displaying a similar table: It did not show a cell text, instead it showed only a colored background.

      Therefore, I would like to propose to

      • show the "Not set" cells as white cells
      • show the "Allow" cells as green cells
      • show the "Prohibit" cells as red cells
      • show the "Deny" cells as dark red cells

        Attachments

        1. after.png
          70 kB
          Marina Glancy
        2. before.png
          69 kB
          Marina Glancy
        3. MDL-48439_compatibility_table_colour_27.patch
          1 kB
          Chris Young
        4. MDL-48439_compatibility_table_colour_28.patch
          1 kB
          Chris Young

          Activity

            People

            Assignee:
            davosmith Davo Smith
            Reporter:
            abias Alexander Bias
            Peer reviewer:
            Ryan Wyllie Ryan Wyllie
            Integrator:
            Dan Poltawski Dan Poltawski
            Tester:
            Andrew Lyons Andrew Lyons
            Participants:
            Component watchers:
            Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, 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:
              23/May/16