A woodwork teacher sought to solve a school's swooping magpie problem by shooting one dead with a gel blaster.