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

Backport course sortorder rewrite to 1.9.x

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.8.4, 1.8.5, 1.9
    • None
    • Other
    • None
    • Debian Etch PHP Version 5.2.0-8+etch7
    • MySQL
    • MOODLE_18_STABLE, MOODLE_19_STABLE

    Description

      I have an installation which when using the page /course/category.php to reorder courses, when you click on the arrows to change the order of a course the page refreshes but nothing else happens. On investigation this seems to be due to the sortorder value in the mdl_course table being set to the maximum allowed for an int field, ie 4294967295.

      I reset the values to 1,2,3 and 4 and then tried the arrows buttons again and the values did not change as I had expected, ie the values swapped around but 1000 was added to each value, eg they changed to 1001, 1002 etc. Use one of the arrow buttons again and 1000 was added. E.g. 2001, 2002 etc

      I then tried with a set of courses on another installation which I hadn't fiddled with whose values were 13005, 13006 and 13007, I then used the reordering buttons and they changed to 14006, 14005, 14007.

      I accept that a user will have to re-order courses quite a few times to reach the int field maximum, but somehow on this site they have. I don't understand why Moodle is adding 1000 to each number, surely it only has to swap the existing values around.

      Thanks

      Richard

      Attachments

        Issue Links

          Activity

            People

              moodle.com moodle.com
              richardburton Richard Burton
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              11 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: