Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 62 lines (51 sloc) 1.72 KB
%%
%% Cover sheet for assessments with random number generator
%%
\documentclass[16pt]{article}
\usepackage[first=1, last=10000]{lcg} % Generates random numbers between 1 and 10 000
\newcommand{\StudentID}{\rand\arabic{rand}}
%%
%% Syntax from following four lines taken from this post:
%% http://tex.stackexchange.com/questions/16189/repeat-command-n-times
%%
\usepackage{expl3}
\ExplSyntaxOn
\cs_new_eq:NN \Repeat \prg_replicate:nn
\ExplSyntaxOff
\begin{document}
%%
%% No numbers on pages
%%
\pagestyle{empty}
%%
%% This is the cover sheet material that each student receives on
%% the day of the test. The student takes the random ID from this cover
%% sheet and writes it on their assessment packet. No student name is
%% placed on the assessment packet, it is only placed on this cover sheet.
%%
%% Note: This uses the \Repeat command to create N cover sheets,
%% where N=number of students taking the assessment.
%%
\Repeat{4}{ % Replace the value in the \Repeat command with the
% number of students taking the assessment
\command{ % \command is repeated N times
\LARGE
\noindent
{\bf Course:} [Course Name] \bigskip \\
{\bf Assessment:} [Assessment Name] \bigskip\bigskip\bigskip \\
{\bf Name:} \hrulefill \bigskip \\
{\bf Test ID:} \StudentID \bigskip \\
%{\bf TA:} \hrulefill \bigskip \\
{\bf Date:} \hrulefill \\
\vspace{2.0in}
\noindent
{\bf Course:} [Course Name] \bigskip \\
{\bf Assessment:} [Assessment Name] \bigskip\bigskip\bigskip \\
{\bf Name:} \hrulefill \bigskip \\
{\bf Test ID:} \StudentID \bigskip \\
%{\bf TA:} \hrulefill \bigskip \\
{\bf Date:} \hrulefill \\
\clearpage\pagebreak
}
}
\end{document}