Yes it was. Dumbledore made him swear to it so a child--Draco Malfoy--wouldn't have to. Also, Dumbledore was terminal anyway, so just sped that up.