Sorting Moodle Course Categories Alphabetically

A colleague recently asked the following question:

Is there an easy way to alphabetize the course categories in Moodle instead of clicking on the up and down arrow for each category? I have a long list that I need to alphabetize.

While there's no button to click to alphabetize course categories--there is one for courses within a category, though--if have access to MySQL database for Moodle, you can make adjustments.

Here's how using phpMyAdmin:

1. Open the mdl_course_categories table 

And then view/browse the data. You can click the NAME column header to alphabetize your list, then quickly go down the list editing each individual row to change the sort order.

2. Edit an individual row of the sort order field to reflect the order you want. For example, the top of the list would reflect "1", the second category in the list would be "2" and so on.

Another fun way would be to export the mdl_course_categories table, import it into Excel, alphabetize, then import it in. But that might strain the nerves.

Delicious Bookmark this on Delicious
Subscribe to Around the

Everything posted on Miguel Guhlin's blogs/wikis are his personal opinion and do not necessarily represent the views of his employer(s) or its clients. Read Full Disclosure


Jerry O said…
Thanks! This worked well. I would recommend numbering by 5s or 10s so if you add categories later you can insert them in their proper spot.

Popular posts from this blog

COVID-19 Droplet Spread and #FREE Tests

Trying a New Pup Out #SPCA #Dog

AudibleNotes: Culturally Responsive Teaching for Multilingual Learners