"Bart Gets a "Z"" is the second episode of Season 21.
When Mrs. Krabappel confiscates her students' mobile phones, they hatch a plan to get their teacher drunk to get her to "loosen up". When Principal Skinner fires her, she is replaced by a cool new teacher, Zachary Vaughn, who impresses the kids with his love of texting, Facebook and Twitter. Bart has a lingering guilt about getting Edna fired and tries to help her. With the assistance of a self-help book-slash-DVD, she opens her own muffin store - but she still plans to be a teacher.
Bart and his classmates get their cell phones confiscated by Mrs. Krabappel for using them in class. At a meeting in Bart's house, the students realize that Homer is always fun to be around when he is drunk so they plan to get Krabappel drunk, in an effort to make her more fun. The students steal some alcohol from their parents and put it in Krabappel's coffee. After Krabappel gets drunk she makes a scene by singing a loud, off-key, incoherent version of "This Old Man" with her students, ends up hitting on Dewey Largo and disrupting an assembly bidding farewell to the foreign exchange students; these drunken antics get her fired. Bart feels bad, so he plans to help Krabappel get back on her feet. Bart and Milhouse buy a book called "The Answer". Following the instructions of the book, Bart and Krabappel build a Muffin store called Edna's Edibles. Then Bart confesses of spiking the coffee with booze and therefore he is responsible for getting her fired. Mrs. Krabappel is furious at Bart and tells him that her real dream was to be a teacher and now she's facing heavy debt as well as a competition from other newly-opened muffin stores. After destroying the self-help book, Mrs Krabappel declares that the only kid she has ever met who is "bad on the inside" is Bart, much too Bart's shock. Meanwhile, at Springfield Elementary, a new teacher called Zachary Vaughn teaches Bart's class and gives everyone their cellphones back, everyone loves him, except Bart. Bart plans to put alcohol in Zachary's energy drink as well but backs out at the last second and chooses to confess to Principal Skinner instead. While he is admitting this, Bart and Skinner hear someone shouting in the hallway. It's Zachary, shouting drunkenly that he hates children. Skinner initially thinks Bart spiked his energy drink and states that he thought Bart told him that he didn't spike it. Zachary confirms Bart's statement, as he has a tendency to spike his own energy drink. Willie takes him away (muttering that it always happens to the good ones as he does so), although not before Zachary attempts to defame the faculty by claiming that they just want to control the students. Krabappel gets her job back, although she does give her revenge to the students for causing her to get fired in the first place by giving them extremely stale muffins.