Teacher accidentally fires gun and injures student in California