I think really harsh to OP.
If the question was phrased like that. And asked at the END of the course.
Firstly if they were interested in anything that might need to do or provide to optimise training for those attending.
Then obviously you ask at the START! So they can act on it.
Usually with training at least what I've had and going back a fair while. It's standard to send a quick form to fill in.
Stuff like
What hope to get out of training
Have you done the things before and to what level
Anything specific you want to understand/ learn
Dietary requirements
Etc
And of course.
Is there anything we should know so that we can do whatever to accommodate for you.
Maybe some specific things eg use a wheelchair. (Shit wording but you get the drift!).
Always ask anything else. This would be where you say impaired hearing/ vision better at front. Etc.
(I have something for that bit so read through loads!)
Asking if directly at the end is nonsensical. Totally nonsensical.
You just passed. Have you got a medical condition impacting on learning?
Well whether you have or haven't. Hearing that of course will not land well at all.
Whether the person does or doesn't, if they haven't disclosed then they either don't have anything or don't want to disclose. It's clear it's just not the thing to ask.
It's shit OP. Pointless to ask at end. Is main issue.
Implying they noticed something about you that made them think hmm maybe medical condition. And surely person will leave wondering what made them ask. Is it obvious? Is it something I'm doing? Etc.
That's NOT the way to send a trainee off!
OP I would be taken aback confused and poss dwell on whatever it was that made them say that.