Teacher barricades himself in class, fires gun-media-5