Enhance API testing to test related courses

This includes the fix to the related courses bug.