Generates variants of exam questions using texsurgery, keeps a question database, exports to pdf and moodle
Project description
pyexams
Generates variants of exam questions using texsurgery, keeps a question database, exports to pdf and moodle.
Much like R exams, but with the following (main) differences:
- R-
exams
requires use of R for both creating exam variants and managing R-exams
itself, whilepyexams
allows any language for exam creation and is called from a command which can be incorporated into your favorite LaTeX editor. - R-
exams
keeps each question in a separate file, then use a simple R script to compose the whole exam, whilepyexams
use a single LaTeX file for the whole exam. - Both R-
exams
andpyexams
keep a record of past exam questions, butpyexams
also keeps a database that can be queried in order to find, for instance, all questions with the tagderivative
that appeared in exams at least two years ago. The question code is also saved in plain text and managed in agit
repository, which simplifies the management of a shared question bank, whether group-private or totally open. - Last but not least, R-
exams
is a mature and feature rich project, whilepyexams
is a very young project that still has to deliver.
Other important design decisions involved in pyexams
:
- The syntax for the questions is exactly that of auto-multiple-choice
- We will use amc2moodle (or a custom version of it) to generate the moodle question bank.
pyexams
strives to feel as close to LaTeX as possible to its users, which paradoxically is better done through texsurgery than through a LaTeX package.
Warning: Alpha version
This is still an early version. Use with care.
Installation
python3 -m pip install pyexams
Usage
cd examples
# generates a pdf for the first student in the list (useful for testing)
pyexams amc2moodle.tex
# generates one pdf for each first student in the list (runs in parallel)
pyexams amc2moodle.tex -all
# generates two pdf files for each first student in the list (runs in parallel)
# one with the exam statement
# other with the correct answer and an explanation
pyexams amc2moodle.tex -all -both
# generates a moodle question bank
pyexams amc2moodle.tex -moodle
# generates a moodle question bank with exactly 5 variants of each question
pyexams amc2moodle.tex -moodle -n 5
How to use
Moodle short questions
- Start with a template from the
examples
folder, make a copy, edit it. - Use
pyexams your_source_file.tex
to test quickly if your code works. - When happy with the result, run
pyexams your_source_file.tex -moodle -n 5
to generate a moodle question bank with exactly 5 variants of each question. - Inspect
your_source_file.xml
for obvious errors. - If the file looks fine, try to upload to moodle.
Long written answer
- Start with a template from the
examples
folder, make a copy, edit it. - Edit
students.csv
with the real data of your students. - Use
pyexams your_source_file.tex
to test quickly if your code works. - When happy with the results, run
pyexams your_source_file.tex -all -both
to generate two pdf files for each first student in the list: - one with the exam statement. - other with the correct answer and an explanation. - Distribute the exam statements at the date and time of the exam.
- Collect the students' solutions using a moodle task or any similar tool.
- Distribute the exam solutions at the end of the exam.
We suggest two ways to distribute the exam statements:
- Through moodle:
- Prepare a moodle folder activity in advance
- Prepare mock pdf files with the same filenames as the real exam statements.
- Zip all the mock exams into a single file, which you can upload to moodle and unzip to deliver all the mock exams quickly.
- Instruct your students to download the mock exam, as a check.
- At the date and time of the exam, upload a zip with the real exam stataments, and unzip it to replace the mock exams.
- Through email (coming soon):
pyexams -deliver question template_file
will send an email to each student with the exam statementpyexams -deliver solution template_file
will send an email to each student with the exam solutionpyexams -deliver correction template_file
will send an email to each student with an attachment taken from acorrection
folder, with the teacher's comments to each exam (could be any other file).
Talk at ENSEMAT II
The motivation behind this project and its design decision was presented (in spanish) at a talk at ENSEMAT II
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyexams-0.2.0.tar.gz
(10.2 kB
view hashes)
Built Distribution
pyexams-0.2.0-py3-none-any.whl
(10.3 kB
view hashes)