History | Log In     View a printable version of the current page.  
We are currently focused especially on Moodle 2.0, Moodle 1.9.x bugs and Moodle 1.9.x testing.    Confused? Lost? Please read this introduction to the Tracker.
Issue Details (XML | Word | Printable)

Key: MDL-12198
Type: Bug Bug
Status: Reopened Reopened
Priority: Major Major
Assignee: Nicolas Connault
Reporter: Matt Gibson
Votes: 11
Watchers: 11
Operations

If you were logged in you would be able to see more operations.
Moodle

AJAX drag and drop is broken for topic sections

Created: 16/Nov/07 06:12 AM   Updated: 15/Oct/08 03:00 PM
Component/s: AJAX
Affects Version/s: 1.9
Fix Version/s: 1.9.4, 2.0

File Attachments: 1. Zip Archive backup-drag_drop_test-20071115-2205.zip (2 kb)
2. Text File section_ajax.patch (10 kb)
3. Text File section_ajax_1.9.patch (10 kb)

Issue Links:
Cloners
 
Dependency
 
Relates
 

Participants: Eloy Lafuente (stronk7), Jerome Mouneyrac, Matt Gibson, Matthew Davidson and Nicolas Connault
Security Level: None
QA Assignee: Jerome Mouneyrac


 Description  « Hide
I'm having trouble working out exactly what is going on here, but in my course, I have 15 sections each with about 3 items and can not move them about without causing mayhem.

If I move 11 onto 7 it makes them swap, instead of inserting 11 in between 7 and 6. Next time I do the same with the new 11 and 7, it works OK. Arranging all of them into a different order (5 operations, firebug shows no AJAX problems), then refreshing the page leaves me with a mess.

I've made a test course to illustrate (attached) which has the topic labels numbered so that initially, section 1 is labelled 1, 2 is labelled 2 etc. This lets you know the original order.

To see the mess, arrange the topics so that they go 1 3 5 7 9 2 4 6 8 10 by dragging 1,2,5,7 & 9 up onto 2 one by one. Then refresh. I ended up with 1 3 5 7 9 6 4 8 2 10.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Matthew Davidson - 02/Jul/08 09:09 PM
AJAX drag and drop for sections is almost completely broken. If you move a section by leapfroging another section (move section 3 to the 1 spot), and then refresh the page, it is wrong.

Also...a bug I fixed a while back has re-reared its head. The date should change as you drag and drop. This needs fixed VERY promptly.

http://tracker.moodle.org/browse/MDL-6892

Nicolas Connault - 05/Jul/08 05:27 PM
I've attached a patch that fixes this in HEAD. It won't be difficult to backport to 1.9, so please provide some feedback so I can go ahead and finally fix this.

Nicolas Connault - 05/Jul/08 08:48 PM
Attached the patch for 1.9

Eloy Lafuente (stronk7) - 07/Jul/08 03:34 PM
Addressing it to 1.9.2... important enough IMO. Thanks, Nico!

Nicolas Connault - 18/Jul/08 10:00 PM
No one has reviewed the patch, but I'm pretty confident it's good, so applying now.

Nicolas Connault - 08/Aug/08 01:29 PM
Merged to HEAD

Jerome Mouneyrac - 12/Aug/08 11:42 AM - edited
Firefox3/LAMP-Moodle 1.9 Stable: drag and drop work fine but when I refresh the page, the new order has not been saved.

Jerome Mouneyrac - 12/Aug/08 11:45 AM
same problem on HEAD

Nicolas Connault - 08/Oct/08 08:25 PM
Fixed again

Jerome Mouneyrac - 14/Oct/08 11:38 AM
Same test result as last time: Firefox3/LAMP-Moodle 1.9 Stable: drag and drop work fine but when I refresh the page, the new order has not been saved.
Sorry Nico, I feel like evil with this issue ;)

Jerome Mouneyrac - 14/Oct/08 11:47 AM - edited
In fact I kind of understand why, my course is Weekly format !

I changed for Topics format, and in this case all works fine.

However for Weekly format something is not consistent. Either the teacher should not be allowed to drag and drop, either the change should be saved.
Even if it doesn't make sens, I prefer the second solution. I think the teacher should be allowed to drag and drop a week before another one if he really wants to do it.