If the students don't want to learn but they learn anyways, they won't like the teacher.

If they want to learn, they will.

That said, I don't know how to get someone else to want to learn. It has never been a problem for me, so I don't know how to address it in someone else.

Cheers,
Ben