Course category sorting by id was broken.  Also added category by id descending

The field of "id" should have been used instead of idnumber for
categories.