A Melbourne magistrate has refused bail for a teacher charged with stabbing a school principal deeming him too great a risk.