Moodle
  1. Moodle
  2. MDL-32218

Disabling Dock Does Not Restore Blocks When User Had All Blocks Docked

    Details

    • Testing Instructions:
      Hide

      1. Log in as a student and go to a course page that has multiple blocks in the left and right columns.
      2. Dock one block from the left column (example: dock Settings and leave Navigation undocked).
      3. Dock all the blocks in the right column.
      4. Log in as admin.
      5. Site administration > Appearance > Themes > Theme Settings. Uncheck "Allow blocks to use the dock" and save.
      6. Log in as the same student from above and return to the same course.
      7. Docks on both side should be restored.

      Show
      1. Log in as a student and go to a course page that has multiple blocks in the left and right columns. 2. Dock one block from the left column (example: dock Settings and leave Navigation undocked). 3. Dock all the blocks in the right column. 4. Log in as admin. 5. Site administration > Appearance > Themes > Theme Settings. Uncheck "Allow blocks to use the dock" and save. 6. Log in as the same student from above and return to the same course. 7. Docks on both side should be restored.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:
      wip-mdl-32218
    • Rank:
      38994

      Description

      When a user has some (but not all) blocks docked and an admin disables the dock, the user's docked blocks are restored as normal blocks. When a user has ALL blocks in a column docked and an admin disables the dock, the user's docked blocks from that column are not restored.

      I was able to reproduce this is in the latest version of 21_STABLE.

      Steps to reproduce:

      1. Log in as a student and go to a course page that has multiple blocks in the left and right columns.
      2. Dock one block from the left column (example: dock Settings and leave Navigation undocked).
      3. Dock all the blocks in the right column.
      4. Log in as admin.
      5. Site administration > Appearance > Themes > Theme Settings. Uncheck "Allow blocks to use the dock" and save.
      6. Log in as the same student from above and return to the same course.
      7. The one docked block from the left column will be restored to the left column but the docked blocks from the right column are nowhere to be found.

        Activity

        Hide
        Michael de Raadt added a comment -

        Thanks for reporting that, Chris.

        I was able to reproduce that. I also noted that when you turn docking back on, the blocks appear again in the dock bar. This indicates that the records for the blocks are remaining, but they are not being displayed correctly when docking is off.

        As always, feel free to help us resolve this issue.

        Show
        Michael de Raadt added a comment - Thanks for reporting that, Chris. I was able to reproduce that. I also noted that when you turn docking back on, the blocks appear again in the dock bar. This indicates that the records for the blocks are remaining, but they are not being displayed correctly when docking is off. As always, feel free to help us resolve this issue.
        Hide
        Adrian Greeve added a comment -

        [Y] Syntax
        [Y] Output
        [Y] Whitespace
        [-] Language
        [-] Databases
        [Y] Testing
        [Y] Security
        [-] Documentation
        [Y] Git
        [Y] Sanity check

        Comments

        • The code is nicely commented and makes sense.
        • The testing instructions are easy to follow.
        • The patch fixes the issue.

        Thanks Raj.

        Show
        Adrian Greeve added a comment - [Y] Syntax [Y] Output [Y] Whitespace [-] Language [-] Databases [Y] Testing [Y] Security [-] Documentation [Y] Git [Y] Sanity check Comments The code is nicely commented and makes sense. The testing instructions are easy to follow. The patch fixes the issue. Thanks Raj.
        Hide
        Rajesh Taneja added a comment -

        Thanks Adrian

        Show
        Rajesh Taneja added a comment - Thanks Adrian
        Hide
        Dan Poltawski added a comment -

        Thanks Raj, i've integrated this now

        Show
        Dan Poltawski added a comment - Thanks Raj, i've integrated this now
        Hide
        David Monllaó added a comment -

        It passes, tested in 22, 23 and master

        Show
        David Monllaó added a comment - It passes, tested in 22, 23 and master
        Hide
        Aparup Banerjee added a comment -

        Your issue has dug up some gold.
        It works great i've been told.
        Go forth, be brave, be bold.

        yay! "All your thoughts are belong to everyone."

        Thanks and ciao!

        Show
        Aparup Banerjee added a comment - Your issue has dug up some gold. It works great i've been told. Go forth, be brave, be bold. yay! "All your thoughts are belong to everyone." Thanks and ciao!

          People

          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: