Jack Tools
Python scripts to assist with JACK and Moodle.
Listat is used to generate csv files for communication between JACK and Moodle. Additionally, this script generates all necessary pdf files to print.
Restat can be used to restart the correction process of JACK if the test files were changed after the testat.
Listat - Usage
Use it as a command line script as follows:
usage: JackMoodleHelper.py [-h] -i INPUT [-j] [-p JACK_PREFIX] [-t TAN_PREFIX] [-o OUTPUT] [-l LOGINS]
[-r RESULTS_PREFIX] [-z] [-m]
options:
-h, --help show this help message and exit
-i INPUT, --input INPUT
the csv file downloaded from moodle
-j, --jack output matriculation numbers for JACK?
-p JACK_PREFIX, --jack_prefix JACK_PREFIX
prefix for output files for JACK, default: JACK_
-t TAN_PREFIX, --tan_prefix TAN_PREFIX
prefix for tan files from JACK, default: examTans
-o OUTPUT, --output OUTPUT
the output file
-l LOGINS, --logins LOGINS
file with login information
-r RESULTS_PREFIX, --results_prefix RESULTS_PREFIX
prefix for files from JACK with the results of the testat
-z, --zusatz set this if you are setting up the Zusatztestat
-m, --merge-results set this if you want to merge all results
The usual workflow is probably:
- (optional) if you are setting up the Zusatztestat, put all results from JACK in a subdirectory
resultsand add-zto all commands python JackMoodleHelper.py -i moodle.csv -j -o moodle_upload.csvtakes moodle.csv (this is the csv file exported from moodle) and generatesJACK_Montag.txt,JACK_Dienstag.txtandmoodle_upload.csv- upload matriculation numbers from
JACK_Montag.txtandJACK_Dienstag.txtto JACK - upload
moodle_upload.csvto moodle - download TAN lists for each Testat from JACK and put them in the same directoy as this script
python JackMoodleHelper.py -i moodle.csv -l kennungen.txttakes moodle.csv and kennungen.txt (the login file from ZIM) and generates all pdfs- print the pdf files
Parameters
-h --helpprint the help page-i INPUT, --input INPUTthe input file from Moodle. You get this file by exporting the registration results. Make sure to select semicolon as the separator and include at least the following fields:- Datum
- Startzeit
- Endzeit
- Ort
- Zeitfenster
- Vorname
- Nachname
- Teilnehmer-ID
-j, --jackif this flag is present, txt files with matriculation numbers will be generated, which can be uploaded to JACK. This is necessary so JACK knows who is registered.-p JACK_PREFIX, --jack_prefix JACK_PREFIXoptional prefix for the output files for JACK-t TAN_PREFIX, --tan_prefix TAN_PREFIXprefix for the tan files from JACK. JACK generates TANs for each registered student. If the name is notexamTans.csv,examTans-1.csvor similar, you can change this value.-o OUTPUT, --output OUTPUTuse this parameter to generate an output file. If you are preparing the testat, this is the csv file containing the plan you want to upload to moodle. Otherwise, if the results of the testat are found in the directory, this is a csv or excel table containing the results of the testat.-l LOGINS, --logins LOGINSthis is the file with login information for the pc pool. Get it from ZIM.-r RESULTS_PREFIX, --results_prefix RESULTS_PREFIXoptional prefix for the result files from JACK after the testat.-z, --zusatzset this flag if you are preparing the Zusatztestat. In that case, the script will look at the subdirectoryresultsand count participation of the students. If someone participated in all Testate before, their registration is removed.-m, --merge-resultsyou can use this to merge all results inresults
Output
This script generates multiple files and does multiple things.
Before the testat:
If -j, --jack is present, it generates txt files with matriculation numbers. If -o OUTPUT, --output OUTPUT is set,
it also generates feedback for moodle. If the TAN file(s) and the specified login file are present, it also generates
the following pdf files:
- Serienbrief.pdf This is the pdf containing the login information and task description for every student.
- Teilnehmerlisten.pdf This is a list of every registered student. Use it to check for attendance.
- ExtraKennungen.pdf This file contains extra login information for students locking the pc by typing the wrong password.
TeX files
You need to modify Serienbrief.tex and \input the correct task. The task definitions are located in testat1.tex
and similar files. If you want to adjust the tasks, edit the commands \taskdefinitionA and \taskdefinitionB
as well as \mainclassA and \mainclassB.
Restat - Usage
Based on this script, you can trigger jack to restart the correction process.
Please use Python 3.6 :) Use it as a command line script as follows:
usage: restat.py username password name_of_testat name_of_task
username -> Username from Jack
password -> Corresponding password
name_of_testat -> Something like "WS23 - Testat 1 - Gruppe 1&2 (20.11.2023)" (which can be found under "Prüfungen")
name_of_task -> Something like "Testat 1 - Gruppe A" (which is the corresponding "Aufgabe/Kurs")