Code Monkey home page Code Monkey logo

exam-generator's Introduction

Exam Generator

Given the current circumstances and due to the COVID-19 pandemic, the university exams are being held online. Some courses use the traditional way of taking an exam: They provide students with a PDF containing questions, students should answer the questions and submit a scanned copy of their answers. Because of this situation, it is necessary to have multiple different exams for different students in the class.

This project generates a random set of problems for every student, given multiple pools of questions. The number of questions in each exam is equal to the number of pools.

Questions will be placed in the main TeX file, in replacement of % CONTENT % string. You can change this arbitrary string in the config file. Also in that file:

  • std_ids is the list of Student IDs;
  • print_after_every_question will be placed in the TeX files, after every question;
  • overwrite_results_folder controls whether to remove or rename the results folder;
  • shuffle_pools controls whether the order of pools should be preserved or should the questions get shuffled in every exam paper;
  • compress controls whether zip outputs should be created, using a random password for each student.

Questions of every pool are distributed almost uniformly in all the exam papers, and the maximum number of differences in their occurrence is 1.

If your TeX file has a specific tag for showing or hiding solutions, you may set hide_solutions_tag to that tag and also generate_solutions to True (In the config file).

Before generating the actual PDFs, a stats file will be created containing the following information:

  • The mapping of student IDs and zip files' generated passwords (If compress == True).
  • Out of every pair of the exams, how many of them have i questions in common? (With i varying from 0 to the number of questions in each exam)
  • In how many exams, every question is used?
  • Which questions every one of the students is given? (0-based)

You can see an example valid TeX project in the example_tex folder, and example generated exams in example_results folder.

Note: You shouldn't use tags like \iffalse and \fi in pool files in order to remove a question. Every \begin{question} tag will be considered as a valid question.

exam-generator's People

Contributors

dependabot[bot] avatar sinahmr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

exam-generator's Issues

Add options for answers and foreign characters like ěščřžýáíé

Hey sinahmr, as a teacher I really appreciate this code and I will use it for my generating exams.
Do you think you could add (or just give a hint here in the comments if you dont wont to modify rep) ABCDE options?

Like:
Screenshot 2023-08-09 at 21 49 43
(with proper spacing, not just a space)

I'd do it myself, but my python/tex skill is insufficient for this.

Also it seem like letters ščřžýáíé and so on tends to give errors. Do you thin you could take a look?
When I modify the question:
\begin{question}
Otázka 987žšč_\
\begin{center}
a) 1 b) 2 c) 3 d) 4
\end{center}
\end{question}
\begin{solution}
solution_text
\end{solution}

I get this LaTeX errors:
! LaTeX Error: \begin{document} ended by \end{question}.
or
.2 Otá
zka 987šč_\
This error message was generated by an \errmessage
command, so I can't give any explicit help.
Pretend that you're Hercule Poirot: Examine all clues,
and deduce the truth by order and method.

LaTeX Font Warning: Font shape /cmr/m/n' undefined (Font) using OT1/cmr/m/n' instead on input line 2.

Missing character: There is no z in font nullfont!
Missing character: There is no k in font nullfont!
Missing character: There is no a in font nullfont!
Missing character: There is no 9 in font nullfont!
Missing character: There is no 8 in font nullfont!
Missing character: There is no 7 in font nullfont!
! Missing $ inserted.

$
l.2 Otázka 987šč_

Thanks in advance!
I'll learn py with TeX once, but for now you're the only hope.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.