Creating a paper-based assessment

This tutorial explains how to create paper-based individualized multiple-choice examinations with isomorphic questions. Digital examinations are inherently insecure, whereas paper-based assessments offer a significantly higher level of security. The same authored questions can still be exported to learning management systems or digital platforms for practice or take-home use, but for high-stakes assessments, paper is preferable.

The steps below guide you through setup and exam creation. While there are several steps, most involve one-off preparation (such as installation and sample downloads).


One-off preparation

Installing the .NET SDK

  1. Download and install the .NET SDK from Microsoft: https://dotnet.microsoft.com/en-us/download/dotnet/8.0. We will use version 8 (LTS: long-term support). Choose the installer for your operating system (Windows, MacOS, or Linux).
  2. Open a console window: Then type: dotnet --version. If the installation succeeded, you will see a version number such as 8.0.404.

Installing the Dividni framework

  1. Download the latest Dividni framework.
  2. Unzip the contents into a convenient location:
  3. (Windows only) Add the Dividni folder to your PATH:
  4. Verify the installation: open a console and run dotnet ~/Dividni/McqTestGen.dll -version (MacOS/Linux) or dotnet C:\Dividni\McqTestGen.dll -version (Windows). On Windows, you may instead run McqTestGen.exe -version once PATH is set. A successful installation prints something like McqTestGen version 24.11.12.

Creating your first exam paper

A multiple-choice exam paper has three essential parts: (1) a cover page or section (prologue) with exam details and instructions, (2) the questions, and (3) an OMR (optical mark recognition) sheet, where students record their answers. Sample files are provided so you can try the workflow before creating your own. Download them here: https://dividni.com/tutorial/samples.zip and extract to a folder such as:

The McqTestGen tool (part of Dividni) generates multiple versions of an exam paper. Each student receives a unique but isomorphic script.

  1. Open a console window.
  2. Navigate to the samples folder: cd C:\Users\John\samples (Windows) or cd ~/samples (MacOS/Linux).
  3. Run the command: McqTestGen.exe -prologue SampleCover.html -paperCount 2 ApplesAndOrangesMCQ.cs (Windows) or dotnet ~/Dividni/McqTestGen.dll -prologue SampleCover.html -paperCount 2 ApplesAndOrangesMCQ.cs (MacOS/Linux).
    This produces two exam scripts: 0000000000.html and 0000000001.html. Open them in a browser and notice that questions differ slightly between versions. The version number (with checksum digits) is shown at the top of each script.
  4. Increase -paperCount (e.g., to 4) and check the additional scripts.
  5. Add -startID to set the starting script ID, e.g. -startID 42.
  6. To generate proof copies with answers marked: McqTestGen.exe -proof -prologue SampleCover.html -paperCount 2 ApplesAndOrangesMCQ.cs (Windows) or dotnet ~/Dividni/McqTestGen.dll -proof -prologue SampleCover.html -paperCount 2 ApplesAndOrangesMCQ.cs (MacOS/Linux).
  7. Alongside .html scripts, .txt answer files are generated. Open 0000000000.txt or 0000000001.txt to see the tab-separated format: question number, answer code, and mark. (Answer codes: 1=A, 2=B, 4=C, 8=D, 16=E).
  8. Add more questions: ... NationalCapitalsMCQ.cs PrancingPonyLocationMCQ.cs
  9. Insert page breaks by adding .xx between questions: ... NationalCapitalsMCQ.cs .xx PrancingPonyLocationMCQ.cs.
  10. Generate 200 scripts with OMR sheets (pre-filled with version IDs): McqTestGen.exe -startId 42 -paperCount 200 -prologue SampleCover.html -omr OmrTemplateSouthernHem.svg ApplesAndOrangesMCQ.cs NationalCapitalsMCQ.cs PrancingPonyLocationMCQ.cs (Windows) or dotnet ~/Dividni/McqTestGen.dll -startId 42 -paperCount 200 -prologue SampleCover.html -omr OmrTemplateSouthernHem.svg ApplesAndOrangesMCQ.cs PrancingPonyLocationMCQ.cs (MacOS/Linux).
If you are at the University of Auckland, please download the UoA sample pack from https://dividni.com/tutorial/samplesUoA.zip, which contains a UoA-specific cover page and OMR sheet. Be sure to read the included _Readme.txt file.


Creating a question

Proficient C# programmers can write questions directly in C#. However, most instructors will prefer the online editor at Dividni.online, which allows you to create questions without coding.

  1. Static answer banks: Write the question, specify correct answers (the more the better), and add incorrect distractors. You can preview the question and, once satisfied, download the C# version to use with McqTestGen.
  2. Parametric variants: More advanced — these allow for dynamic variations in question data.
  3. Create a few practice questions relevant to your course.

Once your question looks satisfactory, copy the downloaded C# code to your local machine. Use it with McqTestGen as shown earlier (see point 3 of “Creating your first exam paper”).

Slightly advanced topics

  1. Including images: Use the HTML <img> tag. Example: <img src='hello.png' style='width: 75%;' alt='pix'/>
  2. Including math: Enable KaTeX or MathJax to write LaTeX in HTML. Use -math katex or -math mathjax. Example (Windows): McqTestGen.exe -math katex -paperCount 2 -prologue SampleCover.html ApplesAndOrangesMCQ.cs QuadraticEqMCQ.cs Example (MacOS/Linux): dotnet ~/Dividni/McqTestGen.dll -math katex -paperCount 2 -prologue SampleCover.html ApplesAndOrangesMCQ.cs QuadraticEqMCQ.cs
  3. Common instructions for a group of questions: See ApplesAndOrangesMCQx2.cs. Replace ApplesAndOrangesMCQ.cs with ApplesAndOrangesMCQx2.cs to try it.
  4. Styling exam papers: Use a stylesheet with -css exam.css. Example: McqTestGen.exe -css exam.css ... (Windows) dotnet ~/Dividni/McqTestGen.dll -css exam.css ... (MacOS/Linux)

Conducting exams

To conduct exams, print the generated HTML exam papers. Optionally, you can convert them to PDF and merge into a single file for easy distribution to printers. You can use tools such as ChromiumHtmlToPdf to batch-convert HTML to PDF.