Moodle
  1. Moodle
  2. MDL-33926

If a section is larger than the visible page area and ajax is turned on the section can no longer be moved to a new position

    Details

    • Testing Instructions:
      Hide

      Test 1 - a section with lots of activities resources

      Pre-requisites:

      • Any course in Moodle.
      • Ajax is turned on.

      Test steps:

      1. Navigate to the course page and turn editing on.
      2. Load up a section with enough resources so that the section is longer than the page.
      3. Drag the section to a new position.
      4. Drag activities/resources from the section to another section.

      Make sure that:

      • Sections can be moved to new positions.
      • Activities/resources can be moved to new sections.
      • Blocks can be moved to a new position currently off screen

      Test 2 - A user with a visual impairment

      Pre-requisites:

      • Any course in Moodle.
      • Ajax is turned on.
      • Zoom in on the browser window so that the text and other page items are Huuuuuge! Trust me a visually impaired software tester that I know actually works lie this.

      Test steps:

      1. Navigate to the course page and turn editing on.
      2. Load up a section with enough resources so that the section is longer than the page.
      3. Drag the section to a new position.
      4. Drag activities/resources from the section to another section.

      Make sure that:

      • Sections can be moved to new positions.
      • Activities/resources can be moved to new sections.
      • Blocks can be moved to a new position currently off screen
      Show
      Test 1 - a section with lots of activities resources Pre-requisites: Any course in Moodle. Ajax is turned on. Test steps: Navigate to the course page and turn editing on. Load up a section with enough resources so that the section is longer than the page. Drag the section to a new position. Drag activities/resources from the section to another section. Make sure that: Sections can be moved to new positions. Activities/resources can be moved to new sections. Blocks can be moved to a new position currently off screen Test 2 - A user with a visual impairment Pre-requisites: Any course in Moodle. Ajax is turned on. Zoom in on the browser window so that the text and other page items are Huuuuuge! Trust me a visually impaired software tester that I know actually works lie this. Test steps: Navigate to the course page and turn editing on. Load up a section with enough resources so that the section is longer than the page. Drag the section to a new position. Drag activities/resources from the section to another section. Make sure that: Sections can be moved to new positions. Activities/resources can be moved to new sections. Blocks can be moved to a new position currently off screen
    • Workaround:
      Hide

      use mousewheel to scroll up while dragging.

      Show
      use mousewheel to scroll up while dragging.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-33926-master-1
    • Rank:
      42030

      Description

      With the implementation of drag and drop on the course page, if a section is bigger than the viewable area on the page, it cannot be moved to a new position and items in the section cannot be moved to new sections either. This is because when you try to drag the section, the page won't scroll.

      To work around this situation the user would have to turn off Ajax in site administration (for the whole site) which only the admin user can do. A typical course content creator such as a teacher or manager cannot do this.

      Potential impact:

      • This could have implications for accessibility, where the course creator has problems with their vision requiring large fonts etc.
      • Frustration for anyone who has a course with lots on resources in sections (probably in topic format).

      Proposed solution:

      1. Find a way of making the page scroll when you drag.
        or
      2. Re-implement the old arrow controls (or equivalent) that move a section when ajax is turned on.

      To recreate:

      Test 1 - a section with lots of activities resources

      Pre-requisites:

      • Any course in Moodle.
      • Ajax is turned on.

      Test steps:

      1. Navigate to the course page and turn editing on.
      2. Load up a section with enough resources so that the section is longer than the page.
      3. Drag the section to a new position.
      4. Drag activities/resources from the section to another section.

      Expected results:

      • Sections can be moved to new positions.
      • Activities/resources can be moved to new sections.

      Actual results:

      • Sections cannot be moved to new positions.
      • Activities cannot be moved to other sections.

      Test 2 - A user with a visual impairment

      Pre-requisites:

      • Any course in Moodle.
      • Ajax is turned on.
      • Zoom in on the browser window so that the text and other page items are Huuuuuge! Trust me a visually impaired software tester that I know actually works lie this.

      Test steps:

      1. Navigate to the course page and turn editing on.
      2. Load up a section with enough resources so that the section is longer than the page.
      3. Drag the section to a new position.
      4. Drag activities/resources from the section to another section.

      Expected results:

      • Sections can be moved to new positions.
      • Activities/resources can be moved to new sections.

      Actual results:

      • Sections cannot be moved to new positions.
      • Activities cannot be moved to other sections.

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          It may be a little late in the game for this, but perhaps Ruslan thinks otherwise.

          Show
          Michael de Raadt added a comment - It may be a little late in the game for this, but perhaps Ruslan thinks otherwise.
          Hide
          Andrew Nicols added a comment -

          There is a Yui plugin for this - see the documentation at:
          http://yuilibrary.com/yui/docs/api/classes/Plugin.DDWindowScroll.html
          http://yuilibrary.com/yui/docs/dd/winscroll.html

          From reading it, it should simply be case of plugging the DDWindowScroll plugin with:
          .plug(Y.Plugin.DDWinScroll);

          when instantiating the initial dd.

          Show
          Andrew Nicols added a comment - There is a Yui plugin for this - see the documentation at: http://yuilibrary.com/yui/docs/api/classes/Plugin.DDWindowScroll.html http://yuilibrary.com/yui/docs/dd/winscroll.html From reading it, it should simply be case of plugging the DDWindowScroll plugin with: .plug(Y.Plugin.DDWinScroll); when instantiating the initial dd.
          Hide
          Andrew Nicols added a comment -

          And this will need to be done for blocks too.
          Not sure whether there's a way of plugging this in lib/yui/dragdrop/dragdrop.js's initializer. I'm not familiar enough with plugging in YUI Plugins...

          Show
          Andrew Nicols added a comment - And this will need to be done for blocks too. Not sure whether there's a way of plugging this in lib/yui/dragdrop/dragdrop.js's initializer. I'm not familiar enough with plugging in YUI Plugins...
          Hide
          Ruslan Kabalin added a comment -

          Two major issues here:

          • scrolling (does not work for small sections either)
          • big sections (sections are not being swapped before you reach certain point, in particular dragging point of the dragged section should cover the section below)
          Show
          Ruslan Kabalin added a comment - Two major issues here: scrolling (does not work for small sections either) big sections (sections are not being swapped before you reach certain point, in particular dragging point of the dragged section should cover the section below)
          Hide
          Aparup Banerjee added a comment -

          just added a work around that seems to work for me.

          Show
          Aparup Banerjee added a comment - just added a work around that seems to work for me.
          Hide
          Martin Dougiamas added a comment -

          If we can scroll the page when a) the mouse is down and 2) near the edge of the page then that would be a perfect solution.

          Show
          Martin Dougiamas added a comment - If we can scroll the page when a) the mouse is down and 2) near the edge of the page then that would be a perfect solution.
          Hide
          Tim Barker added a comment -

          I just tested it in 2.2 and the screen scrolls when you drag sections to new positions off page so this is a 2.3 regression!

          Show
          Tim Barker added a comment - I just tested it in 2.2 and the screen scrolls when you drag sections to new positions off page so this is a 2.3 regression!
          Hide
          Frédéric Massart added a comment -

          It looks as easy as adding the plugin Y.Plugin.DDWindowScroll, but it must conflict with something else because I couldn't get it working.

          Show
          Frédéric Massart added a comment - It looks as easy as adding the plugin Y.Plugin.DDWindowScroll, but it must conflict with something else because I couldn't get it working.
          Hide
          Andrew Nicols added a comment -

          This plugs in the DDwinscroll which should fix the above issues

          Show
          Andrew Nicols added a comment - This plugs in the DDwinscroll which should fix the above issues
          Hide
          Frédéric Massart added a comment -

          I finally found why it wouldn't work... I wrote DDWindowScroll instead of DDWinScroll. Arg >_<!

          Show
          Frédéric Massart added a comment - I finally found why it wouldn't work... I wrote DDWindowScroll instead of DDWinScroll. Arg >_<!
          Hide
          Ruslan Kabalin added a comment -

          Looks good to me as a quick solution.

          Show
          Ruslan Kabalin added a comment - Looks good to me as a quick solution.
          Hide
          Frédéric Massart added a comment -

          Restoring Andrew's patch, which I, somehow, did not notice...

          Show
          Frédéric Massart added a comment - Restoring Andrew's patch, which I, somehow, did not notice...
          Hide
          Frédéric Massart added a comment -

          All right, sorry guys. I first erase Andrew's patch. Now I peer review right after Ruslan's...

          Anyway, after two patches, and two peer reviewers, feel free to submit that for integration Andrew.

          Thank you both!

          Show
          Frédéric Massart added a comment - All right, sorry guys. I first erase Andrew's patch. Now I peer review right after Ruslan's... Anyway, after two patches, and two peer reviewers, feel free to submit that for integration Andrew. Thank you both!
          Hide
          Martin Dougiamas added a comment - - edited

          Yay! Thanks!

          Show
          Martin Dougiamas added a comment - - edited Yay! Thanks!
          Hide
          Aparup Banerjee added a comment -

          just testing this, works fine in the normal test but with the visually impaired test(max zoom) and a dock on the left , i'm getting scrolled to the left as well as up/down as i drag up or down (on chrome). it does make dragging the sections quiet difficult.

          in the normal mode, a section larger than the browser length that is dragged to a position that was out of screen (in ff) seems to keep scrolling even when i reach the position that i want to drop the section at. (i can still quickly drop the section but if i linger it will continue scrolling.)

          but this still improves things

          Show
          Aparup Banerjee added a comment - just testing this, works fine in the normal test but with the visually impaired test(max zoom) and a dock on the left , i'm getting scrolled to the left as well as up/down as i drag up or down (on chrome). it does make dragging the sections quiet difficult. in the normal mode, a section larger than the browser length that is dragged to a position that was out of screen (in ff) seems to keep scrolling even when i reach the position that i want to drop the section at. (i can still quickly drop the section but if i linger it will continue scrolling.) but this still improves things
          Hide
          Aparup Banerjee added a comment -

          pushing the button on integrating this. will create another issue for the zoomed in troubles.

          Show
          Aparup Banerjee added a comment - pushing the button on integrating this. will create another issue for the zoomed in troubles.
          Hide
          Aparup Banerjee added a comment -

          ok, i've integrated this into master.

          this has been tested and alls good except; the visually impaired user test has failed - issue MDL-33994 created.

          Show
          Aparup Banerjee added a comment - ok, i've integrated this into master. this has been tested and alls good except; the visually impaired user test has failed - issue MDL-33994 created.
          Hide
          Aparup Banerjee added a comment -

          and passed. this should help a few souls out there, thanks!

          Show
          Aparup Banerjee added a comment - and passed. this should help a few souls out there, thanks!
          Hide
          Andrew Nicols added a comment -

          Alas, the scrolling plugin for dd doesn't allow for any settings (e.g. turn off horizontal scroll; speed; scroll within document only; etc) so I'm afraid without doing some work on the plugin, or a new featureset in YUI, this is the best we can offer at the moment.

          Show
          Andrew Nicols added a comment - Alas, the scrolling plugin for dd doesn't allow for any settings (e.g. turn off horizontal scroll; speed; scroll within document only; etc) so I'm afraid without doing some work on the plugin, or a new featureset in YUI, this is the best we can offer at the moment.
          Hide
          Martin Dougiamas added a comment -

          Works for me! Thanks guys!

          Show
          Martin Dougiamas added a comment - Works for me! Thanks guys!
          Hide
          Tim Barker added a comment -

          Also tested this as per testing instructions, it's been well tested and has passed. Awesome work.

          Show
          Tim Barker added a comment - Also tested this as per testing instructions, it's been well tested and has passed. Awesome work.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Yay. just in time for Moodle 2.3 release! Many thanks!

          Closing as fixed, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Yay. just in time for Moodle 2.3 release! Many thanks! Closing as fixed, ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Note this is the only issue remaining with one mdlqa label and still open linked QA issue. Could you take a look, closing the QA and/or cleaning the label?

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Note this is the only issue remaining with one mdlqa label and still open linked QA issue. Could you take a look, closing the QA and/or cleaning the label? TIA and ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: