You searched for: “in loco parentis
In loco parentis. (Latin legal term)
Translation: "In the place of a parent."

Having the responsibilities or role of a parent, e.g. teachers during the time students are under their charge are in the legal position of a guardian. Anyone who serves in loco parentis may be considered to have responsibilities of guardianship, either formal or informal, over minors.