user-determined order and number of courses on myMoodle

This is a re-post of what I wrote over at the Moodle.org forums. If you have an account, it would probably be better to post there.

I’ve been quiet about this for a few weeks on the topic of myMoodle, but have now gotten to a point where I can share what I’ve got with anyone interested. I have also finally created a tracker item: MDL-19430 – “user-determined order and number of courses on myMoodle
Mind you, it’s still done yet! The code is quite ugly and will need some cleaning up, and more importantly, some comments.

The attached zip (see MDL-19430)  contains my code, which needs to go to /moodle/local/. in addition to this, my code relies on MDL-17446 (“LOCAL: my moodle centre column override“) which Penny Leach wrote in December, almost as if to allow things like what I did here.

Another thing that’s not quite ready for prime time yet, is that I haven’t created a database xml file in /moodle/local/db/ yet. It will come, though.
As it is at the moment, the attached code requires the manual (by admin) creation of two new additional profile fields:
myNumCourses
myorder
both are straight text fields (not text input), and it’s clearly visible that I need to fix the names to be firstly consistent, and secondly in agreement with the coding guidelines.
It also requires you to add some lines to /moodle/theme/standard/styles_layout.css. This is something I find annoying and will try to remedy as well…

Anyway, if you risk installing this code, users will get two and a half new features on myMoodle:
1: users have the option to change the order of courses on myMoodle by clicking up and down arrows while in editing mode.
2: user can choose how many courses are displayed on myMoodle by changing the number in the drop-down box while in editing mode.
2 1/2: course details such as due assignments are initially collapsed when the myMoodle page is loaded. they can be unfolded by clicking an icon.

only a certain number of courses is displayed in normal mode

all courses are displayed in editing mode. THe ser can move courses up and down and choose how many should be displayed when editing is turned off

1 Comments.

  1. Nice work mate! Will pass the link around here in case Ash & Co haven’t already caught on :)