No, but a bad optical drive could prevent seeking for the hard drive in some cases.
It is worth a try. The media test failure usually relates to the optical drive.
There are an unusually large number of reports of non-detection of the hard drive lately... so it could be from an infestation.
The problem, as you describe it, is very weird to me.
Usually, non detection is an indication the hard drive has failed... one of the chips on the drive no longer responds to the signals from the BIOS.
More than likely something you copied over to that drive likely damaged it somehow.
If it were mine, I would put that drive back into the other case jumpered as a slave, and see if you can see the drive there, with the other drive jumpered as Master. If you can get the drive to turn, and you can see files and folders on the slave drive, then you likely damaged the four boot sectors on the leading edge of one or more of the platters... but you may have damaged the magnetic media that is there... although I do not see how.
If you can see that slave drive, I would save all the valuable data to a Flash drive or burn it to a CD, then reformat the drive using a Windows disk or from the Master...
Another possibility, if it is not a Toshiba drive, is to go to the web site of the manufacturer of the drive, where you can download the drive fitness test and the drive setup software, and see if it can then detect the drive and completely restore the hard drive to new status. This will mean you would then need to reformat and reinstall that drive when re-jumpered as Master or Cable Select in the HP.
You either have a bad drive, a bad connection some where, a missing or incorrect jumper, or an infestation that is doing real damage... because what you did is routine and should have resulted in a trouble free drive.
Is there any chance at all that the drive was reformatted or accesses in some way by the computer? Are the computers Similar? What is the brand and age of the computer to which you visited and from which you saved data?
Mysteries are only fun when it is not your computer.