When I was a student, I used to try to program some games. Once, learning how to program 3D games, I discovered an amazing domain (or a part of it) called “projective geometry”. At the time, I was struck by it and an idea started to grow: I had to “teach” it by creating some practical exercises introducing the concept. This became my motivation and it triggered a whole lot of learning. I learned a lot on the subject (as we always do when teaching) but I also learned a lot of tools, including LaTeX. Analyzing the motivation factor, it is probably that I felt I just discovered the existence of something so important that sharing it with other people became a mission (actually, my document was never widely distributed ;)). Analyzing the learning, what I needed to learn was complicated enough but still within reach, so it created perfect learning conditions.
One of my low-motivation situation was in a course on organic chemistry. The teacher was trying to explain things but none of the students were managing to understand anything. As I mostly cannot learnt without understanding, each class and exercise session was a real pain and felt like a failure and a complete loss of time. Not only wasn’t I learning from classes but I was quickly totally demotivated to even try harder. To add a very positive note on this story, one day the teacher said something like “I have no idea how to explain this better” and he selected a person (that seemed to understand a little more than us all) and asked that person to explain to us. Then a discussion in the class really started and I think we finally managed to create some meaning around the matter. It seems that, in some way, this course taught me a lot, even if I don’t remember any of the actual content.