You'll find everywhere:
<?php
$sortorder = 'visible DESC,'. $CFG->navsortmycoursessort.' ASC';
?>
My dirty solution:
$CFG->navsortmycoursessort = 'idnumber DESC, <other>'
The second field ( <other> ASC) put something usefull for you. Maybe name, category...