This article says the two accused were her students, which supports my initial speculation about motive.
Not that this is ANY reason to kill a teacher, but the motive you mentioned seems plausible, especially since she was specifically a Spanish teacher, and in most cases, high school students are required to pass 2 years of a foreign language in order to graduate.
But there's also the possibility of a hate crime or a thrill killing as someone else mentioned. Either way, incredibly tragic.
MOO