Student jailed for demo attack