As far as I know, tapeworm cannot be passed on from person to person, as it grows inside the intestine. For it to get there, food with larvae on it has to be eaten, meaning that the larvae can attach itself onto the wall of the intestine with hooks. It continues to grow there gaining more and more segments until they reach each section reaches the anus, where it is then disposed of (if you catch my drift). However the only way to get rid of them is by antibiotics. They can often grow inside the body unnoticed for years.
How it managed to get onto the floor of the shower is a very difficult question to answer (and probably very gross at that), but it does not pose a threat to other gym users, as it is ringworm that is infectious, not tapeworm. Still gross though!
Hope this helps!!