Fixing PHP warnings.
Using session course order instead of the name see BT#8316