Did someone raise the bar while I wasn't looking?

I'm struggling. In my class. My stupid class that I don't even want to take for credit. I want to take it to help me prep for my April exam. Now not only am I worried about passing the exam, I'm also worried that so far I have a B in a graduate level course. I didn't even think they gave out Bs in graduate school. Looks like I was wrong. This past week I got a 7 out of 10 on a project and a 7 out of 10 on a quiz. I made a dumb mistake on the project so I can accept that 7, but I knew the material for the quiz backward and forward. I walked out of the classroom on Thursday feeling triumphant when in actuality I'd blown it. What's going on? I mean, it's not like I'm not trying here. And so far in my life trying has usually been enough.

It's vexing, but also just really discouraging. Right now it's very hard to be motivated to study more.