I'm a knitter and an instructor.
For a formal class, I'd say knitting is a definite NO NO.
Knitting before class or after class, fine (though not in my class, because it's a lab and you don't want good yarn in the lab).
Knitting during a seminar series not connected to a class, I'd say is more reasonable, particularly if you have a notebook out to take pertinent notes.
The reason I will knit during seminars/journal clubs is because they are inevitably held in large, dark, stuffy, inadequately ventilated and poorly climate-controlled rooms. As soon as the lights go out, it's like I'm a parakeet, if I'm even slightly sleep-deprived (a constant state in graduate school), the blood pools in my legs, the oxygen content in the air is sucked out by my fellow audience members and I'm doing the head-nod thing and can't keep my eyes open no matter how interesting the material on the screen is. (They also tend to serve cookies at these functions, so the sugar crash doesn't help either). If I'm knitting, it keeps my body active enough that I can keep alert and pay attention. I even seem to take better, more useful notes than I would if I were sitting there, desperately trying to stay awake. And just to make sure that people don't think me inattentive, I usually ask a question after. I'd hardly do that if I couldn't remember the lecture because I was trying too hard to stay awake.
As for proper knitting in lectures, I'd recommend circular needles, especially bamboo. No clicking, no banging if the drop, no rummaging under neighbors chairs if they escape like straights or dpns. They also take up less elbow space, and allow you to put down your project to jot down a particularly important point.