The school was on lockdown yesterday afternoon (Thursday) following reports of a man wielding a knife outside.
A 43-year-old man who was arrested was later detained under the Mental Health Act.
Despite parents’ shock, many have praised the school’s teachers for their “quick” and “professional” response to the incident, in which three people were injured.
Mum Sue Cockroft said: “Children [were] reassured and kept in their classrooms until the police confirmed that individuals were safe to leave the building.
“Parents were brought into the school and taken to the hall until it was safe for children to be collected.
“There was no panic, no chaos. I am proud to be a parent of a child at Moldgreen .”
Karen Sides wrote on the Examiner’s Facebook page: “The staff at Moldgreen primary school could not be faulted in the way they responded to this incident. They responded swiftly and kept the children calm.”
A school spokesman said: “No children were at risk during this period and we are helping the police with their enquiries.”
A West Yorkshire Police spokesperson confirmed this morning that a man arrested had been detained under the Mental Health Act.
Police said the incident was not terror-related.