\documentclass[a4paper]{article}

\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{forloop}
\usepackage{pgf}
\usepackage{tikz}
\usepackage[box,completemulti]{automultiplechoice}
\begin{document}

%%% preparation of the groups

\setdefaultgroupmode{withoutreplacement}

\newcounter{question}
        \forloop{question}{1}{\value{question} < 4}{
\element{all}{
\input{./q\arabic{question}.tex
            }}}   

\element{all}{prova
  \begin{tikzpicture}
\foreach \i in {1,...,5}{$F_{\i}$};    
  \end{tikzpicture}
}

%THIS DOES NOT WORK
% \begin{tikzpicture}
%   \foreach  \i in {1,2,3,4}{
% \element{all}{
%  \input{./q\arabic{question}.tex
%              }}
% };
% \end{tikzpicture}





%%% copies

\onecopy{1}{

%%% beginning of the test sheet 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 and lastname:

\vspace*{.5cm}\dotfill
\vspace*{1mm}
\end{minipage}}}

%%% end of the header

\insertgroup{all}
\shufflegroup{all}
}
\end{document}
