Fixed error in retrieving courses and in displaying ratings in lists

- Fixed an error with no ratings getting a type error
- Fixed non rated degrees not appearing in the list due to indentation error