YOU SAID:
my friend farted in history class
INTO JAPANESE
私の友人は歴史授業で怒った
BACK INTO ENGLISH
My friend got angry at history class
INTO JAPANESE
私の友人は歴史授業に怒った
BACK INTO ENGLISH
My friend got angry at history class
That didn't even make that much sense in English.