The episode ends where Fozzie tells a joke, and Animal drives a bulldozer, throws a tomato below Fozzie, before saying 'Go Bye-Bye!'
Despite being forced to apologize to Fozzie, Piggy was entirely in the right by giving him an F. It had nothing to do with his jokes, he was being disruptive and rude and not taking the class seriously.