\documentclass{article}
\usepackage{xltxtra}
\usepackage[bloc,completemulti,lang=FR]{automultiplechoice}
\usepackage{multicol}
\setmainfont{Linux Libertine O}
\geometry{paper=a4paper}
\begin{document}
\def\AMCmakeTitle#1{\par\noindent\hrule\vspace{1ex}{\hspace*{\fill}\Large\bf #1\hspace*{\fill}}\vspace{1ex}\par\noindent\hrule\par\vspace{1ex}}
\AMCrandomseed{1527384}

\element{grB}{
\begin{question}{Q001}

\AMCOpen{lines=4}{\wrongchoice[0]{O}\scoring{0}
\wrongchoice[P]{P}\scoring{1}
\correctchoice[V]{V}\scoring{2}
}
\end{question}
}
\def\insertPlainGroupgrB{\insertgroup{grB}}
\onecopy{5}{
\begin{center}\bf\large titre 2\end{center}

{\setlength{\parindent}{0pt}\hspace*{\fill}\hbox{\vtop{\AMCcodeH{id}{3}}}\hspace*{\fill}\begin{minipage}[t]{5.8cm}$\longleftarrow{}$\hspace{0pt plus 1cm}Please code your student number opposite, and write your name in the box below.\vspace{3ex}

\hfill\namefield{\fbox{\begin{minipage}{.9\linewidth}\AMClocalized{namesurname}

\vspace*{.5em}\dotfill

\vspace*{.5em}\dotfill
\vspace*{1mm}
\end{minipage}
}}\hfill\vspace{5ex}\end{minipage}\hspace*{\fill}

}\vspace{4mm}
Veuillez répondre aux questions ci-{}dessous du mieux que vous pouvez.

\vspace{4mm}\noindent\hrule


\shufflegroup{grB}
\vspace{2ex}

\insertPlainGroupgrB


}
\end{document}
