How to automatically add marks to questions?

Added by Adin Ramirez about 8 years ago

I was looking for this feature in the documentation and in the forums without luck.

I was trying to add automatically the marks (or score) to the question automatically. For example, if a question has two marks I would like to show

Question 1 (2 pts) Question goes here?

The marks should appear somewhere near the question, or preferable if the position is customizable (similar to the exam class http://www.ctan.org/tex-archive/macros/latex/contrib/exam).

How can I achieve this? is there an internal counter for the marks assigned to each question to redefine the question macro? or an already built in option?


Replies (5)

RE: How to automatically add marks to questions? - Added by Alexis Bienvenüe about 8 years ago

At compilation time, LaTeX does not know the maximum number of points for a given question. This could be quite simple to know when using simple scoring strategies, but with complex scoring strategies, this can be very hard to compute.
If you are using some simple scoring strategies, such as haut for multiple questions, you can consider writing a LaTeX macro:

\def\scoreHaut#1{ (#1 points) \scoring{haut=#1}}

\begin{questionmult}{color}\scoreHaut{2}
  Question...
  \begin{choices}
    ...
  \end{choices}
\end{questionmult}

The same can be done for simple questions, and/or for other scoring strategies.

RE: How to automatically add marks to questions? - Added by Adin Ramirez about 8 years ago

The problem with that type of macros is that is dependent on the scoring strategy I'm using, and that I have to manually modify every question.

For example, if I want to change a couple of questions with default values, I can't use the same macro I need to use another one.
And if I keep changing it will become more work to keep track of the scores than put them in other places.

If LaTeX doesn't know the values in the first run, you can always use the aux files to compile it using several runs. Is that possible?

RE: How to automatically add marks to questions? - Added by Alexis Bienvenüe about 8 years ago

If LaTeX doesn't know the values in the first run, you can always use the aux files to compile it using several runs. Is that possible?

Not implemented yet, and not trivial (can lead to different values for different student copies, even for the same question), but possible.

RE: How to automatically add marks to questions? - Added by Adin Ramirez about 8 years ago

I get your idea. Is there any internal variable that holds the scores for each question?
I would like to check it and thinker with it, if possible.

I checked the code (.sty) but is hard to move around without knowing the variables and the internal behavior.
Any help will be apreciated, or pointers to the documentation of how the code works.

RE: How to automatically add marks to questions? - Added by Alexis Bienvenüe about 8 years ago

No. Scoring strategies are simply logged by LaTeX to be used by AMC.
After a auto-multiple-choice prepare --mode b run (done when scoring (with the update marks scale ticked), the max scores for each question can be found in the scoring SQLite dtabase (in the data subdirectory of the project directory, see the beginning of the DataModule/scoring.pm file for details).

(1-5/5)