In "The 43 Peculiarity", Leonard, jealous of one of Penny's school friends, asked Sheldon's assistant Alex (Margo Harshman) for advice, and she mildly hit on him. Not seeing Alex's pass for what it was, Leonard laughed it off, and later in the episode, Penny finally admitted she loved him.
In "The Egg Salad Equivalency", Alex hits on Leonard more clearly, and Sheldon's attempt to dissuade her brings all the guys into Human Resources. Even with Sheldon's lack of common sense well established, I found it hard to believe he wouldn't realize he were making Alex uncomfortable and throwing suspicion on his friends.
In Season 4's "The Apology Insufficiency", Sheldon comically cost Howard a plum job, making a shambles of his FBI background check. In that episode, he realized he was wrong, but here he doesn't at all, delegating to Alex the sexual harassment course assigned to him.
While this is funny in an absurd way, it makes Sheldon look more a buffoon than the genius he's supposed to be. Compared to times Sheldon's awkward behavior came from an earnest place, this seemed trumped up for cheap laughs, as did his spanking Amy in this season's "The Fish Guts Displacement".
The heart of the episode was Penny's reaction to Alex's pass at Leonard. Just as Leonard felt threatened by Penny's school friend, Penny's insecurities surface here. Having declared her love for Leonard, Penny couldn't pretend not to care about Alex's advances or Leonard's enjoying them. In contrast to previous seasons, Leonard and Penny are equally insecure because they are both risking their hearts.
Once again I'm glad Penny decided against competing with Alex intellectually. Good relationships aren't solely based on common interests. They also thrive when people welcome each other's individuality, as Leonard and Penny have done over the series' run.