Above is an exchange taken from qiushibaike.com. As far as I can understand, it goes like this (trying to keep translation literal for example's sake):
Son: Mom, our teacher's a liar!
Mom: Why would you say that your teacher's a liar, did he cheat you or what?
Son: I asked the teacher a question and he actually said that he doesn't know! How can he know if I do it correctly or not if he doesn't know it?
Mom: Well, son, when did you ask him that question?
Son: ...During the test.
Now, the problematic sentence is this one:
妈妈: 那儿子你是在什么时候问老师问题的?
My gripes:
- I would have said it: 『那儿子你什么时候问老师问题?』. Would that be correct? (do I need 在 before 什么时候 in there?)
- The sentence has 是 in it, which normally takes a noun phrase afterwards. Furthermore, to my knowledge, the possessive marker 的 is tacked at the end of a noun phrase. Is there a noun phrase in there, then? Is it 在什么时候问老师问题的? If so, could you help me break down the sentence to understand its structure?
- If the sentence in (1) is correct, is the 在 in 在什么时候 always optional, or is it necessitated by the structure of the original sentence?
*when are you going to eat?*
vs. 你是什麽時候吃飯的?*when did you eat?*
); (2) 時候X的 is a noun which means*the time X was done*
; (3) 在 is optional in the same sense that**at** what time did you eat?
. means the same thing as*what time did you eat?*
.你是在什麽時候問老師問題的
is the same grammatical construction as你是怎麽去的
or你是跟誰去的
(given in that link).