|
|
|
[
Permlink
| « Hide
]
Chris Potter - 02/Oct/07 08:29 PM - edited
I should probably clarify also that the sections are the middle column, NOT the blocks on the left and/or right side of the page and that we're using Moodle 1.8.2.
The move_section function in course/lib.php is only designed to swap adjacent sections.
I've attached a patch that makes it behave correctly. I've had a little luck... now it works (almost) as expected. Now, if I drop an item onto another (ex: topic 5 onto topic 2), the one I'm moving shows it taking the place of topic 2, but in the database gets set to the one BELOW topic 2.
AJAX movement and backend database movement work the same for me. I tested, amongst other things, moving topic 5 onto topic 2 a number of times.
There are related problems that might cause confusion though, see MDL-11675. I realized that the code i'm testing with contains some additional changes that might be pertinent. I've made the changes to the page layout to occur only after the AJAX request is successfully completed. I'm attaching a patch with all the related changes included. Just a note to say that this problem persists in 1.9 (tested on 1.9 beta 4)
I've been testing Nicklas' patches on 1.9, and still I'm seeing some odd behaviour. For example, I had numbered sections ordered as follows:
1,3,4,2,5 I dragged section 2 and dropped it between 1 and 3. The immediate effect was to change to this order: 2,3,1,4,5 The I clicked reload, and suddenly I had this: 1,5,3,2,4 Which is just baffling. I've had a good look at Nicklas' section-moving patch and it seems OK to me, but I'm clueless about Ajax so I'm guessing that's where the problem lies... Please disregard this issue (and its patches), it is a clone of
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||