12

I would like to create a multiple choice test with LaTeX. It has the following boundary conditions:

  • 20 questions (q1...q20) per test .
  • 20 students (s1...s20) take the test, the order of the question should in general be different for every student.
  • The order of the possible answers should also vary between the students. So if question q1 of version s1 is question q5 of version s2, answer A of q1 in s1 should in general not be the same as answer A of q5 in s2.

I use MiKTex 2.9.

tvk
  • 1,637
  • 3
    Hi Sot Mathematician and welcome to TeX.sx. In its current form, your question might not receive many answers. Please take a look at the How to Ask-page and try to improve your question according to the guidance found there. This may require you to show some effort on your part in terms of attempting a solution. If you have questions about what to do or if you don't quite understand what this means, please ask for clarification using the add comment function. – Anke Apr 09 '13 at 14:39
  • 2
    This is an interesting question. I do not know how to do it exclusively in LaTeX, but if I had to do this, I would write a python script which generates the tex files and build them by calling pdftex. – behzad.nouri Apr 09 '13 at 17:40
  • Using the scripting approach (LuaTeX?), it would be easy to write something that would work well with the exam document class. I'd be interested to see a pure LaTeX solution though --- essentially this boils down to the randomization of \items in a list environment. – Sean Allred Apr 09 '13 at 17:54
  • AcroTeX may also be useful here; it doesn't allow for the whole functionality of OP's question (I don't think, I don't use it), but it does allow for randomization of questions. – Sean Allred Apr 09 '13 at 18:02
  • 1
    This is just a matter of selecting a random question: See for example Generating a worksheet, or Random quadratic equation. – Peter Grill Apr 09 '13 at 18:12
  • 4
    I would hate marking them:) – yannisl Apr 09 '13 at 18:54
  • @YiannisLazarides: That's for a follow-up question. :-) – Matthew Leingang Apr 09 '13 at 19:05
  • I found the eqexam package(really good), which suffles the answers but (i think) not the questions! – Sot Mathematician Apr 09 '13 at 20:05

5 Answers5

7

My collegue and I have written a package based on AcroTeX and probsoln which allows to do exactly what you want, using only latex. The package, named esami (the Italian word for exams) is available on CTAN.

Heiko Oberdiek
  • 271,626
grames
  • 785
5

I'm surprised You don't already know automultiplechoice.sty. http://home.gna.org/auto-qcm/index.en... You can use the LaTeX class for your purpose, and if you're not afraid working with Linux, the software will automatically correct the exam for you !

3

We have put the beta version of the package in a public shared folder on google drive. You can use this link:

https://drive.google.com/folderview?id=0B5j7iaSnRmWQWWJvRFYyd2VNMWs&usp=sharing

We will welcome any suggestion or comment for improving this package.

As for the problem of marking the exams, we have also written a small package built on Acrotex by D.P. Story, using which we are able to prepare exams (MCQ only at the moment) automatically marked and evaluated by the pc. You can find a small example on the website of a project we are following at my school, at the following link

http://minerva.falco.mi.it/wwwroot/pdemo.asp.

Here you should click on the last link, prova di verifica 1. Unfortunately, both the package and the website are at the moment available only in Italian.

grames
  • 785
  • I' ll try this!!! Thank u. Looks like great!!! – Sot Mathematician Apr 10 '13 at 17:34
  • I've tried to latex the maker.tex file in your examples folder, but errors occured like :

    Package ifplatform Warning: shell escape is disabled, so I can only detect \ifwindows.

    ) \c@app@runs=\count157 ("C:\Program Files\MiKTeX 2.9\tex\latex\pst-pdf\pst-pdf.sty" Package: pst-pdf 2008/10/09 v1.1v PS graphics for pdfLaTeX (RN,HjG) \c@pspicture=\count158 Package pst-pdf Info: MODE: 9 (inactive mode) on input line 458. )) ("C:\Program Files\MiKTeX 2.9\tex\generic\genmisc\random.tex" \randomi=\count159 \ranval=\count160 )

    – Sot Mathematician Apr 10 '13 at 21:11
  • 1
    I have uploaded at the previous link some new files, you can try with them. Please try also the following suggestions
    1. Do not use directly master.tex for the compilation, as it cannot be compilated directly. You should change its name otherwise the compilation stops
    2. you can also try to enable write18 (it is necessary for auto-pst-pdf to work): from a command line, write pdflatex --enable-write18 testA (or whatever is the name of your file)
    3. if you have any other problem, please post here the significative lines of the log file.
    – grames Apr 11 '13 at 12:29
  • Your new master.tex worked ok but only for section{part2}. When i also unmark section{part1} the follow errors occur : Undefined control sequence } %after the \closevers line Missing number, treated as zero } , Missing \endcsname inserted }, File `./\filev .tex' not found. }, Creation of doulepse3-autopp.dvi failed.,Creation of doulepse3-autopp.dvi failed. – Sot Mathematician Apr 11 '13 at 20:37
  • We have checked the master.tex file and we have found a missing command. The new file charged now at the same link works here. If you have any other error, you can try to use the file testA.tex in the examples folder, also this file works here. The file testA.tex works the file master.tex. Thank you for all your feedback. – grames Apr 12 '13 at 11:57
  • Hello there! Great! It's working! Now, i'm trying to complete the greek version, but two things i'm looking for :
    1. How to change the text "Page" in the footer(i've tryied \def\pagename but it's not working).

    Thanx. 2) How to change the points text next to every exercise. I'm going to upload the greek version file on the drive page after that.

    – Sot Mathematician Apr 12 '13 at 21:12
  • You can have a look at the file es-ukenglish.lng which contains all the strings you need to translate. For example, to change the text for page, you can change in the lng file for greek \def\pagename{Page} of the english version to \def\pagename{σελίδα}. The same thing should be done for the points text changing \def\es@pointname{point} of the english version to \def\es@pointname{σημείο} (I hope that the greek words are correct). Thank you for the greek translation: I wished to do it myself but my knowledge of the written language is not so good. – grames Apr 12 '13 at 22:21
  • Sorry: perhaps the second translation is \def\es@pointname{ποντος} :-) – grames Apr 12 '13 at 22:53
  • How can we load the options for the greek - hellenic language? I've translated the ukenglish file and saved it as es-hellenic.lng. What to do after? Where in the preamble is this loaded? I've tried to change in \documenent class the option UKenglish to hellenic but nothing happened... – Sot Mathematician Apr 12 '13 at 23:23
  • We have charged in the same folder a new file esami.sty with a new option [hellenic] for the greek language. You can try with this new file and your file es-hellenic.lng, now it should work. Let us know if all is ok. There is also a new folder, translations, in which you can put your translated file. Thank you again. – grames Apr 13 '13 at 16:39
  • unfortunately the google drive folder does not work anymore. I need a new link i think... I'm going to charge there all the new files and options for greek support, whenever this will be possible. – Sot Mathematician Apr 14 '13 at 06:41
  • I have tried various solutions, also to change account and share it again, but it gives always the same error. I have shared it on dropbox, this is the link: https://www.dropbox.com/sh/0t92kehukgafni5/0Mi0qsYLlR. You can see all the files, included the new esamis.sty with the option hellenic. The folder translations is the one in which you can upload your translation, unfortunately I think that this is possible only if you have a dropbox account. If you don't have it, let me know and I'll try to find another way. – grames Apr 14 '13 at 09:16
  • I uploaded the files i worked with translated in the dropbox folder translations\greek but it doesn't work i think...Check it out if you want.. – Sot Mathematician Apr 14 '13 at 14:10
  • Unfortunately I don't see anything in the folder translations. I think you should send me the link of the folder "greek" because the folder is not shared between our accounts, at the moment. – grames Apr 14 '13 at 14:25
  • I've sent you an email...if not the right one tell me at shasapis@gmail.com – Sot Mathematician Apr 14 '13 at 15:02
2

We have solved the problem of the support for greek fonts, which seemed not to work previously: the option greek must be used, in the master file, both in article and in babel; the packages inputenc, fontenc and babel must be loaded before the package esami. Maybe the same solution can work with other non latin fonts. At the link https://www.dropbox.com/sh/0t92kehukgafni5/0Mi0qsYLlR you can find an updated version of the package, as well as the greek translation, provided by Sot Mathematician.

grames
  • 785
1

It's not a straightforward solution, but you might want to try a python script I've written, for exactly this task (as runnerup suggested). You will need XeLaTeX, python, and a command-line interface, unfortunately. On the other hand it has a little bit more features than minimal permutations of questions and answers (e.g., variants of questions, Optical Mark Reading, moodle integration, html+CSS pages like this). The commands, descriptions and documentation are a random hybrid of English and Italian language - probably you will need google translate or figure out some italian words.

EDIT: I've written a description in English, in case anyone is interested.

dlf
  • 21