\documentclass[12pt,a4paper]{article}
%%%§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§
%Ici my preamble

\usepackage[bloc]{automultiplechoice}
\usepackage{csvsimple}%<- Important, the package read the csv file.

%%%§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§
\newcommand{\exam}{ %The command handles the copy
\onecopy{1}{ %<- mandatory

%%%%%%%%%%%%%%%%%header %%%%%%%%%%%%%%%%

\noindent{\bf QCM  \hfill TEST}

\vspace*{.5cm}
\begin{minipage}{.4\linewidth}
  \centering\large\bf History and geography\\ Examination on Jan. 1st, 2008
\end{minipage}
\namefield{\fbox{\begin{minipage}{.5\linewidth}
\firstname{} \name{} \Id
\vspace*{1mm}
\end{minipage}}}

%%% end of the header


%%%%%%%%%%%%%%here \restituegroupe{}%%%%%%%%%%
%%%%%%%%%%%%%or other questions %%%%%%%%%%%

\begin{center}
  \hrule\vspace{2mm}
  \bf\Large Geography
  \vspace{1mm}\hrule
\end{center}

\insertgroup{geographie}

\begin{center}
  \hrule\vspace{2mm}
  \bf\Large History
  \vspace{2mm}\hrule
\end{center}

\insertgroup{histoire}
 
\begin{question}{Last}
Anything else ?
\AMCOpen{lines=2}{\wrongchoice[0.25]{0,25}\scoring{0.25}\wrongchoice[0.50]{0,5}\scoring{0.5}\wrongchoice[0.75]{0,75}\scoring{0.75}\correctchoice[1]{1}\scoring{1}}
\end{question}

\AMCassociation{\Id}%

}%<- end of onecopy
}%<- end of newcommand

%%%%§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§

\begin{document}

%%%options of Latex or AMC
\setdefaultgroupmode{withoutreplacement}

%%%%%%%%%%%%%%%%%%%%%%% begin groups%%%%%%%%%%%%%%%%

\element{geographie}{
  \begin{question}{Paris}
    In which continent is Paris?
    \begin{choices}
      \correctchoice{Europe}
      \wrongchoice{Africa}
      \wrongchoice{Asia}
      \wrongchoice{planet Mars}
    \end{choices}
  \end{question}
}

\element{geographie}{
  \begin{question}{Cameroon}
    Which is the capital city of Cameroon?
    \begin{choices}
      \correctchoice{Yaoundé}
      \wrongchoice{Douala}
      \wrongchoice{Abou-Dabi}
    \end{choices}
  \end{question}
}

\element{histoire}{
  \begin{question}{Marignan}
    In which year did the battle of Marignan take place?
    \begin{choiceshoriz}
      \correctchoice{1515}
      \wrongchoice{1915}
      \wrongchoice{1519}
    \end{choiceshoriz}
  \end{question}
}

\element{histoire}{
  \begin{questionmult}{Nantes}
    What can be said about the \emph{Édit de Nantes}?
    \begin{choices}
      \correctchoice{It was signed in 1598}
      \correctchoice{Il has been revoked by Louis XIV}
      \wrongchoice{It was signed by Henri II}
    \end{choices}
  \end{questionmult}
}


%%%%%%%%%%%%%%%%%%%%%%% end of groups%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%% copy the  liste in the same files%%%%%%%%%%%%%%%%%%%%%%%%%
\csvreader[head to column names]{liste.csv}{}{\exam}%<-reading the csv file

\end{document}



