\documentclass[a4paper]{article}

\usepackage{automultiplechoice}
\usepackage{intcalc,ifthen}

\begin{document}
\newcounter{calculate}	
\setcounter{calculate}{0}

	\setdefaultgroupmode{withoutreplacement}
	
	\def\fillgroup#1{
		
		\element{groupe#1}{
			
			\begin{question}{#1-1}
				Question #11
				\begin{choices}
					\correctchoice{Correct}
					\wrongchoice{Wrong A}
					\wrongchoice{Wrong B}
				\end{choices}
			\end{question}
			
		}
		\element{groupe#1}{
			
			\begin{question}{#1-2}
				Question #12
				\begin{choices}
					\correctchoice{Correct}
					\wrongchoice{Wrong A}
					\wrongchoice{Wrong B}
				\end{choices}
			\end{question}
			
		}
		\element{groupe#1}{
	
	\begin{question}{#1-3}
		Question #13
		\begin{choices}
			\correctchoice{Correct}
			\wrongchoice{Wrong A}
			\wrongchoice{Wrong B}
		\end{choices}
	\end{question}
	
}
		\element{groupe#1}{
	
	\begin{question}{#1-4}
		Question #14
		\begin{choices}
			\correctchoice{Correct}
			\wrongchoice{Wrong A}
			\wrongchoice{Wrong B}
		\end{choices}
	\end{question}
	
}	
	}
	
	\fillgroup{a}

	
	\onecopy{15}{
		
		{\Large\bf TEST EXAM}
		\vspace{2ex}
		
		\namefield{\fbox{    
				\begin{minipage}{.5\linewidth}
					Name :
					
					\vspace*{.5cm}\dotfill
					
					\vspace*{.5cm}\dotfill
					\vspace*{1mm}
				\end{minipage}
		}}
		\vspace{2ex}
		

\ifthenelse{ \intcalcMod{\AMCStudentNumber}{5} = 0}
{\addtocounter{calculate}{1}}{\relax}

\insertgroupfrom[1]{groupea}{\thecalculate}	
	}
	
\end{document}
