Question ID erro message shows up when number of papers is incresed

Added by Nikola Z. Guscic over 4 years ago

I have about 350 questions distributed over several topical folders within an MC-project. All of the question/folders compile well if used independently. When trying to use some randomly chosen questions from each folder to produce a final exam it compiles well in LaTex editor, but throws out error messages when using AMC-GUI. The error message indicates that the same Question ID is used several times.

After checking one by one that all question IDs are unique I stumble upon a quick fix to disable all questions from a certain input file. In theory this shouldn't make a difference as all IDs are unique, but it does. After disabling 5 questions my exam compiles neatly in AMC-GUI.

Now I want to increase the number of papers from 1 to 10, and similar error messages are thrown out, however this time there is more of them. I find out by trial and error that I can produce 3 different exam papers without errors, attempting to produce more results in error messages about same question IDs. However, this time the software doesn't detect layout.

The exam I am producing is not overly large in itself, about 58 multiple choice questions selected from an input base of around 350 questions.

The project is a bit complex, around 48 MB total so providing a minimal working example would not be simple. However, I may synchronize it to Dropbox tomorrow and provide a link if that would help.


Replies (4)

RE: Question ID erro message shows up when number of papers is incresed - Added by Alexis Bienvenüe over 4 years ago

To have a double-check for common IDs, you can try something like

grep -Pr '\\begin\{question(mult)?\}' . | sed 's/.*}{//' | sed 's/}.*//'

to extract the IDs from the project directory. Add | wc -l at the end of this command to get the number of IDs, and | sort -u | wc -l to get the number of unique IDs: check these are the same.

However, this can also come from the grouping/shuffling or so.

However, I may synchronize it to Dropbox tomorrow and provide a link if that would help.

Maybe, if one can read and understand your project's architecture quickly...

RE: Question ID erro message shows up when number of papers is incresed - Added by Nikola Z. Guscic over 4 years ago

This is interesting. According to the output of commands provided, I have about 839 IDs in the project, of which 410 are unique.
However, the actual number of questions in the project is about 300+.

I have noticed that the output of the first commands lists both complete IDs and parts of IDs are listed, and many of these partial IDs are not unique.
For example, it will list:
  • Topic 1 MCQ001
  • Topic 1 MCQ002
  • MCQ001
  • MCQ002

and so on. First two items are actual question IDs while MCQ001 and MCQ002 are not IDs for any questions. However, they appear as a part of many Question IDs, so they end up being listed many times.

Meanwhile, I have played with renaming Question IDs a bit and the project works again in it's entirety.

RE: Question ID erro message shows up when number of papers is incresed - Added by Alexis Bienvenüe over 4 years ago

These grep commands are not very robust, that's true.

Meanwhile, I have played with renaming Question IDs a bit and the project works again in it's entirety.

Good! Did you get what was breaking the project?

RE: Question ID erro message shows up when number of papers is incresed - Added by Nikola Z. Guscic over 4 years ago

My own sloppiness, apparently there were a few questions with non-unique IDs tucked away at the end of a long input file. At some point I had made a mistake with applying 'Find and Replace all' function.
That is why I could produce up to 3 different exams, but increasing the number of papers would bring some of those questions together in the same exam and break the project.
Software was working exactly as it should be.

(1-4/4)