Remove unnecessary JOIN to check if course has substitute - refs BT#8566
Register the course id instead of the course code - refs BT#8566
List one substitute coache by specified date - refs BT#8566