The power of teachers' identity towards the resolution of critical incidents. Primary and secondary educational backgrounds