Skip to main content

An exam generator

Project description

examgen

examgen is an exam generator for the LaTeX document class exam. It is written using literate programming through NOWEB. The program code is Python 3 and the documentation is LaTeX.

Installation

There are two options for "installing" this utility. Either go to releases, download the code and put it in your PATH. Otherwise you can follow the build instructions below.

Building

To build the executable file you need NOWEB, there is a package on most systems. For the documented source code you also need a LaTeX distribution, e.g. TeXLive. There are TeXLive packages for most systems. Finally, to run the program you need Python 3. These should also be available on most systems.

Once you have the dependencies. Make sure to first clone the submodules:

git submodule update --init

Then you can build the documentation PDF by

make examgen.pdf

To get the executable code run

make examgen

then run ./examgen -h to get the usage. (You can also run make examgen.py is you prefer to have the .py file-name extension.) Finally, if you'd like to have the examgen command available somewhere in your $PATH, then

sudo make install

will put examgen in /usr/local/bin.

In summary:

$ git clone https://github.com/dbosk/examgen.git
$ cd examgen
$ git submodule update --init
$ make examgen.pdf examgen
$ sudo make install

Example usage

To generate the exams I have an exam directory for the course, in this
directory I have a Makefile which says something along the lines of:

.PHONY: 2016
2016: exam-160603.pdf exam-160822.pdf exam-161024.pdf

exam-161024.pdf: exam-161024.tex q-161024.tex
exam-160822.pdf: exam-160822.tex q-160822.tex
exam-160603.pdf: exam-160603.tex q-160603.tex

%.pdf: %.tex
	latexmk -pdf $<

MODULE_QUESTION_DBs+=	 ../modules/crypto/questions.tex
MODULE_QUESTION_DBs+=	 ../modules/crypto/slides.tex
EXAM_TAGS+=	           AnalyseNeededCryptoProperties
EXAM_TAGS+=	           DesignSystemsWithCryptoProperties

# Until you cover the desired intended learning outcomes ...

q-160603.tex q-160822.tex q-161024.tex: ${MODULE_QUESTION_DBs}
	examgen -NCEi -d ${MODULE_QUESTION_DBs} -t ${EXAM_TAGS} > $@

Each exam-<date>.tex file \inputs the corresponding q-<date>.tex in the question section.

With the above Makefile, whenever it's time to submit the exams for the 2016 instance of the course, I just run the command make 2016 in that directory. That will create questions for each exam. (I can create the individual sets of questions by running make q-<date>.tex.)

What actually happens when I run that command is the following:

  • The exam generator will try to find questions in the files MODULE_QUESTION_DBs whose tags are subsets of the required tags specified in EXAM_TAGS. The exam needs enough questions to cover the required tags (the -C option) --- but no tags which are not in the required tags (the -E option). To avoid excessively many questions on the exam, we require that each question adds coverage of a non-covered required tag (the -N option).

  • The -i parameter enables the interactive (or inspirational) mode. This opens each qualifying question in the user's favourite editor, set by the EDITOR environment variable. This allows you to use the exam generator to generate questions for inspiration: you use the questions as starting points when creating new ones. But if a question truly is the perfect question you can always use the question without any modification.

  • The way the questions are tagged is as follows. Each question is tagged with the intended learning outcomes (ILOs) it covers --- which is what we examine in a course! The ILOs in the course syllabus represent the least a student should be able to do to pass the course. So we need ILOs for the higher grades too to be able to grade an exam A-F. In the example above: AnalyseNeededCryptoProperties for E and DesignSystemsWithCryptoProperties for A.

For a more automated and systematic way of using examgen, see the chapter on exam.mk in the documentation of the makefiles.

Project details


Release history Release notifications | RSS feed

This version

4.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbexamgen-4.0.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbexamgen-4.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file dbexamgen-4.0.tar.gz.

File metadata

  • Download URL: dbexamgen-4.0.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.2.0-39-generic

File hashes

Hashes for dbexamgen-4.0.tar.gz
Algorithm Hash digest
SHA256 dfc0259c7b72bd42781f436957df93041a7b2f4215da30f617f1927fa7ca9433
MD5 2ab615adeb8a3c4e98578e5538791a49
BLAKE2b-256 9e4351ba29c7ce1458e9c40286af3b0560e181b9cc6987fc006f4d8f198400f9

See more details on using hashes here.

File details

Details for the file dbexamgen-4.0-py3-none-any.whl.

File metadata

  • Download URL: dbexamgen-4.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.2.0-39-generic

File hashes

Hashes for dbexamgen-4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9fad6da7e9c6671cddcc4cce50d9fdd6f4df4f4f9662a5c07a1c35dfbd214c8d
MD5 12002615be368e26774a50f62e31d38b
BLAKE2b-256 a1533f1e86147d33818f1a0fbdfa1ff686b5eb130c4a4e756e96f8c8211a82a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page