Cd tray stays open
There could be damage to the tray contact switches
(these tell to the control unit the position of the tray - open/closed), so that the control unit can start/stop and reverse the direction of the tray ejector motor.
These contacts are located somewhere underneath the tray (usually near the front unit cover), and since you mentioned that the tray was bumped while it was open, it is possible they were damaged. Also, the behaviour of the tray suggests that the control unit can no longer tell whether the tray is open or closed so it operates the tray motor in a wrong manner, which, again, points to these same contacts as the possible cause.
Repairing the contacts may be a somewhat delicate procedure, first you need to locate them (it may require partial disassemby of the tray mechanism), if they are bent a pair of tweezers might do the job, if there's hard damage, it's probably better to replace them (scrapped CD ROM units or a dead CD unit might be a good source, they just need to be of the same dimensions).
There may also be other causes for this malfunction, i just mentioned the first thing that i would check.
Hope this helps somehow.