The attack was carried out on Friday in apparent response to a lesson about freedom of expression that showed the students cartoons depicting the Prophet Muhammad.