The teacher racked her brains designing this course.
Tips
history
From Peng Yang'ou's 《黑籍冤魂》 (Ghosts of the Black Register, late Qing): 「这煎烟方法,我是煎费苦心,三番五次的试验」 — describing an opium-cooking method pursued with painstaking effort. 煞 is an intensifier meaning 'extremely.'
mistakes
煞 here is read shà (as an intensifier), not shā ('to kill'). Same character, different reading — one of Chinese's built-in tripwires.