1

I want to extend the exam class to have more than two parts for the question field. Also, reflect that on the grading table.

Typically, you would write a question given two arguments like this /question[5] The question (points are optional). This will result in a valid question, and the points will be reflected on the grading table correctly. What I'm seeking is to extend the /question keyword to take three arguments.

  1. The question points (just as it works now)
  2. The question group type (a number we use internally to categorize questions)
  3. The question-wording (also as it works now).

Thus if you write something like /question[5][1] The question the desired result would be

(5 points) The question

Where the [1] argument is only visible in the new grading table.

However, the default exam class will have something result on something like this.

(5 points) [1]The question

This is not the only possible issue. When you have a question where you rely on parts to add up points, you don't want to have redundant points entry on the question level. Thus, typically you would skip entering the points like this /question The question. But once you add an argument for the question grouping, you cannot simply skip it and have the grouping id like this /question [1] The question, where latex will consider [1] as the question points arguments. Hence, there must be a way to skip the points argument with something like this /question[~][1] The question. By adding [~] we will be trying to tell latex to skip the points on the question level and get it from the /parts points if any.

To have a more concrete example and all the possible issues I'm aware of, the code below shows an example of the code I wrote and how it looks now vs. how I would like it to look (this is not a solution this just a demonstration of the goal).

\documentclass[addpoints]{exam}

\usepackage{enumitem}

\begin{document}

\section{How \emph{exam} class works}

\begin{center}
\gradetable[h][questions]
\end{center}

\begin{questions}
    \question[10][2]{First Question?}
    \question[~][1]{Second Question (True/False):} % if you put 10 here the total for this question will be 20!
    \begin{parts}
        \part[5] First statement.
        \part[5] Second statement.
    \end{parts}
    \question[20][3]{Third Question?}
    \begin{parts}
        \part First part.
        \part Second part.
    \end{parts}
\end{questions}

\end{document}

Which will result in the following output:

enter image description here

Where the desired output should be as the following:

enter image description here

1 Answer 1

0

The desired result can be obtained from:

\documentclass[addpoints,answers, 12pt]{exam}

\usepackage{enumitem}

\begin{document}

\vspace{10mm}
\section{How \emph{exam} class works}

\begin{center}
 \gradetable[h][questions]
\end{center}
\vspace{5mm}
\begin{questions}
    \question[10]
    First Question?
    \vspace*{\stretch{1}}
    \question[10]
    Second Question (True/False): 
    \begin{parts}
        \part[5] First statement.
        \vspace*{\stretch{1}}
        \part[5] Second statement.
        \vspace*{\stretch{1}}
    \end{parts}
    \question[20]{Third Question?}
    \begin{parts}
        \part First part.
        \vspace*{\stretch{1}}
        \part Second part.
        \vspace*{\stretch{1}}
    \end{parts}
\end{questions}

\end{document}

which gives a portion of the exam as: partial exam sample.

It should be noted that \question[~] gives ( points) without a value and \question[~][1] gives a boxed 1 without a points value.

3
  • I think you missed my point. I'm aware that the\question[~][1] will result in a question with ( points) and a boxed 1. I want to extend the exam class to consider not ignoring the ~ sign, and the number 1 will only be visible in the grading table under a special field (e.g., CLOs). My issue is not knowing how to update the \question keyword to take three arguments (points, CLO#, and question-wording) and update the grading table to reflect the second argument.
    – zalsaeed
    Apr 25 at 1:18
  • @zalsaeed The comment provided should be an edit to the question. With this more direct information it would provide information to the proposed question and eliminate guessing what is being sought.
    – Leucippus
    Apr 25 at 4:54
  • 1
    Fair. It was just updated. I think it is in good shape now.
    – zalsaeed
    Apr 26 at 20:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .