\documentclass{article}
\title{Quiz 0}
\author{MATH-UA 120.006 Discrete Mathematics}
\date{January 24, 2018}

\usepackage[insidebox,answers]{automultiplechoice}
\makeatletter
\renewcommand{\maketitle}{
    \noindent\parbox{\textwidth}{%
    \Large\@author
    \hfill\@title
    \hfill\@date}
    \hrule\bigskip
}
\newenvironment{question*}{%
    \edef\AMCquestioncount{\value{AMCquestionaff}}
    \renewcommand{\AMCbeginQuestion}[2]{\relax}
    \begin{question}
}{%
    \end{question}
    \setcounter{AMCquestionaff}{\AMCquestioncount}
}
\makeatother


\usepackage{tikz}
\usetikzlibrary{MATH-UA-123}
\usepackage{fp}
\AMCboxDimensions{shape=oval,down=1mm}

% You need to set the random seeds in case you want to regenerate the quiz 
% after printing. comma-r-n-d gets a number from random.org (atmospheric noise 
% is about as random as it gets). comma-p-r-n-d gets a pseudorandom number 
% (works offine).
%
% Update the date below to keep from copy & pasting the same seed from 
% quiz to quiz.
%: random seeds regenerated 2017-09-10
\def\randomseed{7132343}
\AMCrandomseed{\randomseed} 
\pgfmathsetseed{\randomseed}
%\usepackage{mathptmx}
\usepackage{leincalc}
\usepackage{nicefrac}
\usepackage{cancel}
\usepackage{enumitem}
\everymath{\displaystyle}

% \scoringDefaultS should be declared in the preamble.
\def\MCptval{2}
\def\TFptval{1}
\scoringDefaultS{e=0,v=0,b=(N==2 ? \TFptval : \MCptval),m=0}
\scoringDefaultM{b=\MCptval/N}


% problem groups go here
% Remember!
% Question ID's cannot have dots in them, because then they become parts of multivalued fields.
% Also, they are typeset in text mode, so they can't have TeX special characters like underscores, either.
% Best: use a colon or hyphen to separate.
\element{TF}{
   \begin{question}{TF-cellphone}
   Cell phones may be used in class if they are kept on silent.
    \begin{choiceshoriz}[o]
%        \correctchoice[T]{True}\wrongchoice[F]{False}
        \wrongchoice[T]{True}\correctchoice[F]{False}
    \end{choiceshoriz}
\end{question}
}

\element{TF}{
    \begin{question}{TF-Piazza}
        The best place to ask (math) questions is the class's Piazza site.
        \begin{choiceshoriz}[o]
            \correctchoice[T]{True}
            \wrongchoice[F]{False}
        \end{choiceshoriz}
    \end{question}
}

\element{TF}{
    \begin{question}{TF-final}
        The final is cumulative.
        \begin{choiceshoriz}[o]
            \correctchoice[T]{True}
            \wrongchoice[F]{False}
        \end{choiceshoriz}
    \end{question}
}


\def\AMCbeginQuestion#1#2{\par\noindent{\bf Question #1} #2\hspace*{1em}}

\begin{document}


\onecopy{1}{
\maketitle
\bgroup
% HEADER for name / section / ID
\setlength{\parindent}{0pt}%
%
This paper will be scanned and read by optical mark reading software.
Indicate your selections by filling in the circles completely.
If you wish to change your selection, erase your marks completely.
\bigskip

\begin{minipage}{0.4\textwidth}
   N Number:
   \par\smallskip
   \AMCcode{NNumber}{8}%
\end{minipage}
\hspace*{\fill}
\begin{minipage}{0.6\textwidth}\raggedright
    \namefield{\fbox{
        \begin{minipage}{0.95\textwidth}
          Name:
          \vspace*{.5cm}%\dotfill
          \vspace*{.5cm}%\dotfill
          \vspace*{1mm}
          \vspace{3ex} 
        \end{minipage}
  }}\medskip
    \noindent
         
\end{minipage}
\hspace*{\fill}
\bigskip

This is a 20-minute quiz.  There are problems on the front and on the back.
\emph{Calculators are neither necessary nor allowed.}
% end of header group
\egroup


\bigskip

\begin{question}{MC-final}
    On which of these dates is the final exam?
    \begin{choices}
        \correctchoice{Monday, May 14}% correct
        \wrongchoice{Thursday, May 10}% calculus exams
        \wrongchoice{Friday, May 11}% review session
        \wrongchoice{Wednesday, May 16}% commencement
        \wrongchoice{Monday, May 7}% last day of class
    \end{choices}
\end{question}


\begin{questionmult}{MC-cheating}
    Which of these are examples of academic dishonesty?
    \begin{choices}
        \correctchoice{Copying the homework of another student without collaboration and citation}
        \correctchoice{Falsifying documents to justify makeup exams}
        \correctchoice{Placing an ad on craiglist seeking someone to take your exam}
        \correctchoice{Asking homework questions on Yahoo! Answers and using answers found there as your own work}
    \end{choices}
\end{questionmult}

\noindent\emph{Identify each of the following statements as true or false.}

\shufflegroup{TF}
\insertgroup{TF}



\clearpage

\begin{question}{FR-why}
    Why are you taking this course?  What would you like to learn?
    \AMCOpen{lines=6,dots=false,answer={%
        }
    }{
        \wrongchoice[0]{0}\scoring{0}
        \wrongchoice[1]{1}\scoring{1}
        \correctchoice[2]{2}\scoring{2}
    }    
\end{question}

\begin{question}{FR-map}
    Draw a map of your home town, and indicate on the map where you live.
    \AMCOpen{lines=7,dots=false,answer={%
        }
    }{
        \wrongchoice[0]{0}\scoring{0}
        \wrongchoice[1]{1}\scoring{1}
        \wrongchoice[2]{2}\scoring{2}
        \correctchoice[3]{3}\scoring{3}
    }    
\end{question}



}% end of \onecopy group
\end{document}