I'd like to add this. Worse... I'd like to get it into 1.9 for purely selfish reasons.
An additional config option for the course_list block to specify the sort order of the courses displayed in the block. The default will be by ascending fullname (same as now), with an option for course start date descending (I guess there could be others).
The idea is to stop the block getting cluttered with last year's courses that have been been copied and kept for references. That is your newest courses are at the top.
The only hassle I can think of is that it will introduce four new strings that will need translated.
The default will be by ascending fullname (same as now)
I'm only on Moodle 1.8, but is not the default to list by course id, descending? Alphabetical course sorting is something that I have to hack back in whenever we upgrade, as nobody likes the default.
Either way, the proposed config option would be very welcome!
I'm only on Moodle 1.8, but is not the default to list by course id, descending? Alphabetical course sorting is something that I have to hack back in whenever we upgrade, as nobody likes the default.
Either way, the proposed config option would be very welcome!

While it would be great to allow users to sort their course listings, there is currently a means for admins to control the course sort order.
The default order for course listings is whatever order they are in on the Administration->Courses->Add/Edit Courses page. (There is a sortorder field in mdl_courses that is determined by the order on this page.) You can move courses and categories up or down on that page to get the ordering that you want. E.g., if you have a 'Current Term' category, moving that category to the top of the list will bring all of the current term courses within the category to the top of the course listings. Within a category, you can move courses around, or sort them alphabetically.
Also, we put all of our previous term courses in their own category, move it to the bottom of the list when the term ends, and then hide the whole category after a few weeks. This avoids the problem of older courses cluttering up the listings as hidden courses are displayed after visible courses (for teachers & admins), and not shown at all for students.
The default order for course listings is whatever order they are in on the Administration->Courses->Add/Edit Courses page. (There is a sortorder field in mdl_courses that is determined by the order on this page.) You can move courses and categories up or down on that page to get the ordering that you want. E.g., if you have a 'Current Term' category, moving that category to the top of the list will bring all of the current term courses within the category to the top of the course listings. Within a category, you can move courses around, or sort them alphabetically.
Also, we put all of our previous term courses in their own category, move it to the bottom of the list when the term ends, and then hide the whole category after a few weeks. This avoids the problem of older courses cluttering up the listings as hidden courses are displayed after visible courses (for teachers & admins), and not shown at all for students.
Hmm.
Both the course_list block and the front page course list call get_my_courses() (lib/weblib.php). The default sort for the function is "$sort=visible DESC,sortorder ASC". The front page course list uses the default sort, so things appear in sortorder according to how things are sorted on the add courses page.
However, it looks like the course_list block passes in it's own sort -
get_my_courses($USER->id, 'visible DESC, fullname ASC')
I'm not sure if there's a good reason for that - it might be better for the block to default to the same sort order as the front page listing.
Anyway, I do think the ability to sort the list in the block is a good idea!
Both the course_list block and the front page course list call get_my_courses() (lib/weblib.php). The default sort for the function is "$sort=visible DESC,sortorder ASC". The front page course list uses the default sort, so things appear in sortorder according to how things are sorted on the add courses page.
However, it looks like the course_list block passes in it's own sort -
get_my_courses($USER->id, 'visible DESC, fullname ASC')
I'm not sure if there's a good reason for that - it might be better for the block to default to the same sort order as the front page listing.
Anyway, I do think the ability to sort the list in the block is a good idea!

I think that the courses block - for a logged in students - is more related to the list of courses they see in the "My Moodle" page. Without looking of course, I think that's alphabetical.
I'm not sure any more. What I want to do is to give users a more useful view of their course list. If I have old courses kept for reference from previous years - I'd like this to be clear. However, maybe this is another option, "display with category" so that the intended category order is maintained.
I'm not sure any more. What I want to do is to give users a more useful view of their course list. If I have old courses kept for reference from previous years - I'd like this to be clear. However, maybe this is another option, "display with category" so that the intended category order is maintained.