updated code for appropriate student/teacher flags for updating/deleting student/teacher records