Bulk uploading a course in a set order

Bulk uploading a course in a set order

by Rikaz Sheriff -
Number of replies: 1
Hi!

Newbie here!

I'm working on a Version 4.0.4 (Build: 20220912) Moodle. 

I'm trying to upload a set of courses in a particular order


I uploaded in this csv format


I got this import result

Am I correct in thinking that if I had uploaded this list upside-down (first course last and vice versa) that Moodle would have uploaded it in order. It seems to have created the courses in that pattern. Would that be a consistent behavior? InshaAllah hoping someone will see this 🐟 in this big 🌊!
Average of ratings: -
In reply to Rikaz Sheriff

Re: Bulk uploading a course in a set order

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Dear Rikaz,

Intriguing!  I don't have an operational M4.0 instance but do have a M4.1 instance, and there is the option to change (persistently) the sort order:

Course sort order.

Looking at the code, there is the 'sortorder' field in the 'course' table that is an integer, default of '0'.  Thus initially, the first course shown will be the first one you've created in that category, as you've experienced.  Clicking on 'Sort courses' and selecting an alternative changes the value of the 'sortorder' field to reflect the choice you have made, thereby being the same when you refresh / revisit the page.

Kind regards,

Gareth