# Customize \ answerline in Exam class

I would like to create a quiz item that resembles this example:

____ 1. (p. 63) In a grouped frequency distribution, the mode falls in the most
frequently occurring class interval, more specifically, at its

-  a. upper nominal limit
-  b. lower nominal limit
-  c. upper real limit
-  d. midpoint.


When using the Exam class, I am unable to insert an \answerline next to the question number. An example of my code follows:

\documentclass[12pt,answers]{exam}
\begin{document}
\begin{questions}
\question (p. 63) In a grouped frequency distribution, the mode falls in the most
frequently occurring class interval, more specifically, at its
\begin{choices}
\choice upper nominal limit
\choice lower nominal limit
\choice upper real limit
\choice midpoint
\end{choices}
\end{questions}
\end{document}

-

You can customize the \questionlabel to get the same affect:

\renewcommand\questionlabel{\rule{0.25in}{0.5pt}\thequestion. }


The downside to this is that answers won't print out if you require that feature.

-
Excellent. Knowing what to search for in the documentation helps a ton. – Daniel Aug 15 '12 at 19:00

Here's sort of an ugly, bludgeoned version of \answerline which accomplishes what you're looking for, and ALSO works with printing out the solutions. I'm trying to do this same thing, so any improvements to this would be appreciated.

\renewcommand\answerline[1][{}]{
\ifx\@queslevel\ques@ref
\let\ans@l=\questionlabel
\else
\ifx\@queslevel\part@ref
\let\ans@l=\partlabel
\else
\ifx\@queslevel\subpart@ref
\let\ans@l=\subpartlabel
\else
\ifx\@queslevel\subsubpart@ref
\let\ans@l=\subsubpartlabel
\else
\def\ans@l{}
\fi
\fi
\fi
\fi
\par \vspace{-35pt}
\hspace{-20mm}
\mbox{
\center
{\LARGE\bfseries #1}
}
}\vspace{15pt}
\else
\hspace{-20mm}
\mbox{