I guess this is an intensifier of sorts that intensifies or makes the adjective along with the noun it precedes sound stronger. When used like that, there absolutely must be an adjective to go along with it. This is actually along the lines of how we use adverbs like so in English. You can't really say this is so (in other contexts you can, but they're not applicable here). You say this is so hot.
As to why It was such an okay test. does not work, my thinking would be that some adjectives are naturally unintensifiable. Alright falls into that category as well. They lack comparative and superlative properties unlike most adjectives in English which do have them. We almost never say more okay or most okay or, God forbid, okayer or okayest. But I can imagine that under certain, though very rare, circumstances they might make sense when used in a whimsical kind of way to intentionally make ourselves sound funny.
In the case of You are such a good student., such is an adverb that is similar in meaning to very and intensifies the adjective good. So, what the whole thing really says is that you're not just a good student, you're more than that.
And that's probably how I would explain it.