The article is really light on details - all I see is the guy was trying to enter the wrong house and was dead on the front porch. Hopefully (for lack of a better term), the student was actively entering the house and threatening the shooter. Maybe he was shot in the doorway and collapsed on the porch, or was shot inside the house and retreated to the porch before collapsing.
And, of course, it could be a psycho who just shot at the first perception of a possible threat.