Personally I always learned the most in courses that were very hard and had a nerdy teacher/professor who did not care at all whether you could follow the stuff on the blackboard / in the presentation. Theses courses required work on your own: you had to read the actual literature again and again to even remotely understand the topics on the weekly exercise sheets, or to pass the exam. This "learning by yourself" lead to a much deeper understanding than just memorizing some concepts from a streamlined lecture.