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

A manager role at site level cannot add blocks

    Details

    • Testing Instructions:
      Hide

      TEST1:

      1. Run a fresh install of Moodle. (The cap for existing installs are not changed by this patch. It needs to be a clean, fresh install for it to work).
      2. Login as admin and assign one of the users manager role at system context(site admin>users>permissions>assign system role)
      3. Goto site admin>users>permissions>capability overview
      4. Select the cap "block:edit" and the role "manager"
      5. Make sure it says "allow" at system context

      TEST2:
      1. Login as a manager and turn editing on for the front page.
      2. Add a comments block.
      3. Configure the comments block and set the page contexts to display throughout the entire site.
      4. Browse to a course and check that the comments block is displayed on the course page.
      5. Configure the comments block on the course page and change the weight on this page to -10.
      6. Check that the comments block is displayed at the top of the course page (or just below any other blocks with weight -10).

      Show
      TEST1: Run a fresh install of Moodle. (The cap for existing installs are not changed by this patch. It needs to be a clean, fresh install for it to work). Login as admin and assign one of the users manager role at system context(site admin>users>permissions>assign system role) Goto site admin>users>permissions>capability overview Select the cap "block:edit" and the role "manager" Make sure it says "allow" at system context TEST2: 1. Login as a manager and turn editing on for the front page. 2. Add a comments block. 3. Configure the comments block and set the page contexts to display throughout the entire site. 4. Browse to a course and check that the comments block is displayed on the course page. 5. Configure the comments block on the course page and change the weight on this page to -10. 6. Check that the comments block is displayed at the top of the course page (or just below any other blocks with weight -10).
    • Workaround:
      Hide

      allow block edit capability for manager role

      Show
      allow block edit capability for manager role
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-33401-master

      Description

      A user with site level default manager permissions cannot add a block to the front page.

      MDLQA-2024 was executed during 2.2 QA testing and passed. I have tested this in 2.2.3 and 2.3 and a user with manager permissions at site level cannot add blocks to the front page on either of those versions of Moodle.

      Test both tests in 2.2.3 and 2.3.

      Test 1:
      Test Pre-requisites:

      • A user assigned the manager role at site level.

      Test Steps:
      1. Login as a manager and turn editing on for the front page.
      2. Add a comments block.
      3. Configure the comments block and set the page contexts to display throughout the entire site.
      4. Browse to a course and check that the comments block is displayed on the course page.
      5. Configure the comments block on the course page and change the weight on this page to -10.
      6. Check that the comments block is displayed at the top of the course page (or just below any other blocks with weight -10).

      Expected result:

      • The manager can add a comments block to the front page.

      Actual Result:

      • When editing is turned on the manager sees "There are no blocks that you can add to this page." in the "Add a block" block and there are no controls to add a block.

      Test 2:
      Test Pre-requisites:

      • A user assigned the manager role at site level.
      • A user assigned the manager role at front page level.

      Test Steps:
      1. Login as a manager and turn editing on for the front page.
      2. Add a comments block.
      3. Configure the comments block and set the page contexts to display throughout the entire site.
      4. Browse to a course and check that the comments block is displayed on the course page.
      5. Configure the comments block on the course page and change the weight on this page to -10.
      6. Check that the comments block is displayed at the top of the course page (or just below any other blocks with weight -10).

      Expected result:

      • The manager can add a comments block to the front page.

      Actual Result:

      • When editing is turned on the manager sees "There are no blocks that you can add to this page." in the "Add a block" block and there are no controls to add a block.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  2 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Jul/12