Former student pleads guilty to massacre