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

Drag n Drop does not work when moving blocks into custom regions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3.2
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      Hide
      1. Install Aardvark Post-IT theme with the patch
      2. Move block to new block region at the top
      3. Move block from the new region (it becomes empty) - make sure that side block regions are not getting hidden at this point.

      Also, testing existing functionality is required:

      1. Move all blocks from left or right region that does not contain block adding block.
      2. On the last block move, the region should be hidden.
      3. Move any block towards the hidden region, the region should be displayed and accept new block.
      Show
      Install Aardvark Post-IT theme with the patch Move block to new block region at the top Move block from the new region (it becomes empty) - make sure that side block regions are not getting hidden at this point. Also, testing existing functionality is required: Move all blocks from left or right region that does not contain block adding block. On the last block move, the region should be hidden. Move any block towards the hidden region, the region should be displayed and accept new block.
    • Workaround:
      Hide

      Switch Javascript off in the browser and move them the old way.

      Show
      Switch Javascript off in the browser and move them the old way.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-33890-master-2

      Description

      In contributed themes like Aardvark Post-IT and Aerie which have custom block-regions set in the layout, the new AJAX Drag n Drop feature does not allow you to move blocks into these designated areas.

      On further inspection of this problem, it has come to light that the main 'block-regions' like 'region-pre' snd 'region-post' have been hard coded in lib/yui/blocks/blocks.js

       var regionid = this.get_region_id(blockregionlist.item(0));
                      if (regionid === 'post') {
                          // pre block is missing, instert it before post
                          blockregion.setAttrs({id : 'region-pre'});
                          blockregionlist.item(0).insert(blockregion, 'before');
                          blockregionlist.unshift(blockregion);
                      } else {
                          // post block is missing, instert it after pre
                          blockregion.setAttrs({id : 'region-post'});
                          blockregionlist.item(0).insert(blockregion, 'after');
                          blockregionlist.push(blockregion);
                      }

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  7 Vote for this issue
                  Watchers:
                  14 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Sep/12