The crazy thing is that this is actually kind of a common dream variant. I've seen others describe it too. It's something that can come up in our common pysche. I have it to, for like two different classes. It's not that vivid, but literally 15 years after graduating college I still occasionally have a "fuck, did I not realize I had an <xyz> class this whole semester?" dream.