How does the sentence end?

Derrick was angry at Logan when he learned that ( 

(i) Derrick ) was the one who did the prank on him..
(ii) Logan ) was the one who did the prank on him..
(ii)