We have one category for each term and at the end of one term the category for the next term is moved to the top so that students can easily find their current modules but still can find the older courses further down the list. That is very easily done with the Moodle user interface. But if I then also have to start renaming all courses it becomes very tedious.
Besides being inconvenient it may also be confusion to many administrators (it was for me). It was only after logging in as a student that I realized that the ordering of the courses has no effect on the "My courses" list for the students.
You are right, that is not so nice. I did not realise that: a student will see ALL his enrolled courses, despite your season approach.. We will try the same next year...
(Would be nice if the student SELF could sort the courses in his personal view..)
I should also note that this issue was one of the major complaints about Blackboard mentioned in this discussion: http://moodle.org/mod/forum/discuss.php?d=6714
It took me some time to come up with a simple solution for an efficient sorting of the list of courses. With hindsight it is ridiculously obvious.
The 'course' table already has a 'sortorder' field but that gives the sortorder within the category, i.e., within each category the courses are again numbered from 0. Therefore this is not convenient to obtain an ordered list of all courses.
I propose that iinstead the numbering in the next category should start where the numbering in the previous category ended. In that way we will end up with one consecutive numbering of all courses. Of course a lot of renumbering will be required each time a category is moved, but I have written a neat recursive procedure to do that.
I have checked through the code and the only place I have found where I needed to make a little change to allow for this numbering is in the code that moves courses within categories.
It is now easy to sort the courses in the "My Courses" list very efficiently, simply by ordering the courses on the sortorder field.
Martin, can I commit this?
This re-numbering procedure (which I assume is a replacement for fix_course_sortorder()) needs to be run:
- when a course is added
- when a course is removed
- when a course is moved
- when a category is moved
I think that between the beta release and the final release no new features should be added to Moodle 1.3. If that is so, could you possibly fork off a branch for Moodle 1.4dev in CVS which will be merged back into the head branch once Moodle 1.3 has been released? I will then commit my changes to the development branch.
This is now in CVS.
So if this is now in the CSV, how would one make the course's menu dropdown list reflect the order of the courses that display in the My Courses page?