How are gaps filled during congregational prayer?
A praying person is allowed to take two steps in order to fill the gap in the row ahead. If the distance was long and requires much movement, then it is impermissible for one to move to fill it because much consecutive movement (three movements) during prayer invalidates it.
Is it permissible for the guardian, or the father of the child to hit the latter in order to teach him/her good manners?
It is permissible for the guardian to hit his/her child for teaching them good manners once they become ten years old provided that it is done mildly, harmlessly and without intimidation. Actually, such punishment is to be employed gradually i.e. after: asking, warning, and scolding. As for the teacher, he isn`t allowed to hit the student unless the latter`s father approves of it, and it is done according to necessity without intimidation, or harm.
Does passing wind, from the anus without a smell, invalidate prayer?
If a person is certain of having passed wind even if it was with no smell, then both his/her ablution and prayer are invalidated, thus he/she should remake ablution and re-perform prayer.
What is the ruling on someone who perform their prayer after finishing it because they believe they missed a Rak'a, a prostration, or that they did not perform it correctly (thinking their prayer was invalid)?
If he was sure that his prayer is void then reperforming it is an obligation along with figuring out the reason of invalidity so long as this wasn't out of uncertainty. And Allah Knows Best.