AITA for losing my patience with a self-deprecating student?

Definitely NTA. Growing up my aunt (raised my sister and I) would do the same thing with meals or housework. Completely sparkling clean house = "im sorry the house is such a mess, I did my best but I know it isn't good enough". Perfectly fine meal that received compliments = "I'm sorry dinner isn't very good tonight I know I never make it good". She wasn't abused, didn't have anxiety or low self confidence, was just fishing for compliments just like your student. This was annoying enough in the home, can't imagine how frustrating it would be for you when you have to remain professional while she wastes limited, valuable class time. You did the right thing here, hopefully it'll be enough to get her to stop this little act.

/r/AmItheAsshole Thread