The gang ends up in a European history class on Community. "Alternative History of the German Invasion" is the fourth episode of the show's fourth season.
Added:

Community Season 4 Episode 4 Quotes

Carl, I see you've grown a new douchebag.

Jeff

Quick impression--waaaa. Who am I? You guys.

Jeff