Police foil high school robbery