|MadSci Network: Physics|
The magnet does not need to move completely past the coil to make electricity, but the coil needs to be part of a closed loop to have electric current. You can imagine the magnetic field flow through the loop, which is called magnetic flux. If the magnet is close to the loop, the flux is large. If it is far to the loop, the flux is small. The current generated in the loop depends on how fast the flux changes and also how large the resistance of the loop is. To increase the speed of flux variation, you can use a stronger magnet, use larger number of coils, or move the magnet faster.
Try the links in the MadSci Library for more information on Physics.