Thanks for writing to health care magic.
It is a very wrong thing that is being done. Why should a 7 year old be punished like that.
Standing in hot sun is harmful both in the short term and long term.
It may cause heat stroke
. Yes it is very much dangerous to punish a kid like that.
Please meet the teacher and the principal and ask them not to take such measures any further. Please change the school if such punishments are given.
Every parent should be watchful of such punishments at school and take necessary action.