What controls the order of classes on a school-configurable academic document?

On a school-configurable academic document, the classes in a given section are sorted using the following in order:

  1. Subject sort key
  2. Course sort key
  3. Class name