106 lines
5.3 KiB
Markdown
106 lines
5.3 KiB
Markdown
# 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 `results`
|
|
and add `-z` to all commands
|
|
- `python JackMoodleHelper.py -i moodle.csv -j -o moodle_upload.csv` takes moodle.csv
|
|
(this is the csv file exported from moodle) and generates `JACK_Montag.txt`, `JACK_Dienstag.txt` and `moodle_upload.csv`
|
|
- upload matriculation numbers from `JACK_Montag.txt` and `JACK_Dienstag.txt` to JACK
|
|
- upload `moodle_upload.csv` to 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.txt` takes moodle.csv and kennungen.txt
|
|
(the login file from ZIM) and generates all pdfs
|
|
- print the pdf files
|
|
|
|
## Parameters
|
|
- `-h --help` print the help page
|
|
- `-i INPUT, --input INPUT` the 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, --jack` if 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_PREFIX` optional prefix for the output files for JACK
|
|
- `-t TAN_PREFIX, --tan_prefix TAN_PREFIX` prefix for the tan files from JACK. JACK generates TANs for each
|
|
registered student. If the name is not `examTans.csv`, `examTans-1.csv` or similar, you can change this value.
|
|
- `-o OUTPUT, --output OUTPUT` use 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 LOGINS` this is the file with login information for the pc pool. Get it from ZIM.
|
|
- `-r RESULTS_PREFIX, --results_prefix RESULTS_PREFIX` optional prefix for the result files from JACK after the testat.
|
|
- `-z, --zusatz` set this flag if you are preparing the Zusatztestat. In that case, the script will look at the
|
|
subdirectory `results` and count participation of the students. If someone participated in all Testate before,
|
|
their registration is removed.
|
|
- `-m, --merge-results` you can use this to merge all results in `results`
|
|
|
|
## 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")
|
|
``` |