No, work (physics) was not done in this scenario. Work in physics is defined as the product of force and displacement in the direction of the force. In this case, the student simply pulled the book off the shelf and placed it back without moving it in a specific direction or over a distance, so no work was done.