Allowing user-determined order of courses on myMoodle

This is a re-post/copy of my post over in the Moodle forums. If you have an account on Moodle.org, you can contribute to the discussion there.

Currently the default order of courses on myMoodle is descending, by ID. This can be changed by changing on line in print_overview() in course/lib.php. However, other ways of sorting, such as alphabetically, or by last access date are not always that useful either.

Some of our teachers have asked if it would be possible to rearrange their courses on myMoodle, similar to the way topics can be rearranged in courses. That way they could determine their own order, and have the most frequently used course on top, or the most important one.

After a bit of experimenting I have now come to a mock-up which may do the trick (after some cleanup):
I have created a new user profile field to store a string with the order of course IDs. print_overview.php looks at this string when loading myMoodle and orders the courses accordingly. Any courses that are not mentioned in the string are moved to the top.

When in editing mode, little up and down arrows are displayed next to the course name. When clicked, they cause the string with the course order to be updated/rearranged, and my/index.php is reloaded with the new order. (No AJAX yet)

So far it appears to be working on my localhost, with 10 courses. I am yet to test it on anything larger.

Does anyone have some ideas about how this will scale?

1 Comments.

Trackbacks and Pingbacks: