Fixed error with getting course IDs and added isRegistered flag