Commit 1805840e authored by Amrita Deb's avatar Amrita Deb
Browse files

Update README.md

parent e3b1276b
......@@ -4,6 +4,8 @@ Preparing exam scans for ship out: Adding watermarks, encryption and preparing u
## Contents
* `preparepdf.py` unzips files from submission zip file downloadable from Moodle(in case there are no scans) and renames it accordingly in the format (<Matriculation number>_<Lastname>)
* `supplements.py` renames and create copies of sample solutions(if any) for every student
* `watermark.py` watermarks each page of PDFs containing exam scans with matriculation number of the respective student
* `encrypt.py` encrypts PDF with password either with a common password(passed as an argument) or a randomly generated password(when there is no argument)
* `preparemoodle.py` prepares for uploading PDFs to moodle via assign module as feedback file for each student
......@@ -20,18 +22,24 @@ Exemplary outputs can be downloaded:
### Prerequisites
* **Create and setup Moodle**
* In your Moodle course room, create an `assign` module following this [guideline](https://help.itc.rwth-aachen.de/service/8d9eb2f36eea4fcaa9abd0e1ca008b22/article/0cfca4212fef4712ad2d432ac83eaf3e)
* Download the grading table `Bewertungen.csv` from Moodle via: `Alle Angaben anzeigen` &#8594; `Bewertungsvorgang` &#8594; `Bewertungstabelle herunterladen`* **Create and setup Moodle**
* In your Moodle course room, create an `assign` module following this [guideline](https://help.itc.rwth-aachen.de/service/8d9eb2f36eea4fcaa9abd0e1ca008b22/article/0cfca4212fef4712ad2d432ac83eaf3e)
* Download the grading table `Bewertungen.csv` from Moodle via: `Alle Angaben anzeigen` &#8594; `Bewertungsvorgang` &#8594; `Bewertungstabelle herunterladen`
* **Create PDFs corresponding to each exam**
* Scan the exams and save the scans as PDFs (each page should be A4). For most copy machines, you can save an A3 scan (double page of an exam) as two A4 pages.
* The filename of each PDF should start with the student's matriculation number (e.g. `123456_Nachname.pdf`).
* Place all PDFs in a folder, e.g. `pdfs`.
** OR: Download submission zip file**
* Download the submission zip file from (Assignment Main Page->View all submissions->Download all submissions)
* **Optional: Sample Solutions alongside exams (Refer [here](https://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/3))**
* **Optional: Create Sample Solutions (Refer [here](https://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/3))**
* Scan the sample solutions and save the scans as PDFs (each page should be A4). For most copy machines, you can save an A3 scan (double page of an exam) as two A4 pages.
* Place all PDFs in a folder, e.g. `supplements`.
* **Create and setup Moodle**
* In your Moodle course room, create an `assign` module following this [guideline](https://help.itc.rwth-aachen.de/service/8d9eb2f36eea4fcaa9abd0e1ca008b22/article/0cfca4212fef4712ad2d432ac83eaf3e)
* Download the grading table `Bewertungen.csv` from Moodle via: `Alle Angaben anzeigen` &#8594; `Bewertungsvorgang` &#8594; `Bewertungstabelle herunterladen`
* **Install the software dependancies**
......@@ -56,7 +64,8 @@ Exemplary outputs can be downloaded:
### Process
Run `supplements.py`(if you want to add sample solutions as well),`watermark.py`, `encrypt.py`, and `preparemoodle.py` (or run `batch.py` which runs all three) as described in the sections below. In summary, these steps will
Run `preparepdf.py` (if you have submissions in a zip and not as scans) `supplements.py`(if you want to add watermarked sample solutions as well),`watermark.py`, `encrypt.py`, and `preparemoodle.py` (or run `batch.py` which runs all) as described in the sections below. In summary, these steps will
1. unzip all PDF files from the zip and rename them according to the schema <Matriculationnumber>_<Lastname>
1. prepare sample solution for each students
1. watermark each page of each PDF with the corresponding matriculation number,
1. encrypt each PDF with a password (global or per-student) and
......@@ -68,6 +77,21 @@ Upload `moodle_feedbacks.zip` to Moodle
### Commands
### Unzip submission files from and rename them
Assuming that ./submissions.zip is the zip file containing all submissions and ./Bewertungen.csv is the grading worksheet
```
python preparepdf.py --inzip ./submissions.zip --outfolder ./pdfs --csv ./Bewertungen.csv
```
or
```
python3 preparepdf.py --inzip ./submissions.zip --outfolder ./pdfs --csv ./Bewertungen.csv
```
### Prepare copies of Sample Solutions for each student (Optional)
We assume that the folder `./supplements` holds the scans of the sample solution.
......@@ -85,7 +109,7 @@ python3 supplements.py
Folder `supplements_out` contains copies of the sample solutions for each student.
#### Watermark
#### Watermark the submissions
We assume that the folder `./pdfs` holds the scans of the exams and .
The filename of each PDF should start with the matriculation number of the student, e.g. `./pdfs/123456_Lastname.pdf`.
......@@ -102,7 +126,7 @@ python3 watermark.py --in ./pdfs --out ./pdfs_watermarked --cores 2
Folder `pdfs_watermarked` contains watermarked PDFs, with each page watermarked with the matriculation number of the student.
**Watermark Sample solution copies**
#### Watermark Sample solution copies
We assume that the folder `./supplements_out` holds the copies for every students
......@@ -116,7 +140,7 @@ or
python3 watermark.py --in ./supplements_out --out ./pdfs_watermarked --cores 2
```
#### Encrypt
#### Encrypt the files
Use either a global password by specifying it with the `--password` option or per-student passwords by ommiting `--password`.
......@@ -161,13 +185,13 @@ Further remarks:
Or do everything in one step
```
python batch.py --in ./pdfs --out ./out --cores 2 --password ganzgeheim --csv ./Bewertungen.csv
python batch.py --in ./pdfs --out ./out --cores 2 --password ganzgeheim --csv ./Bewertungen.csv --supinfolder ./supplements --sup 1 --zip ./submissions.zip
```
or
```
python3 batch.py --in ./pdfs --out ./out --cores 2 --password ganzgeheim --csv ./Bewertungen.csv
python3 batch.py --in ./pdfs --out ./out --cores 2 --password ganzgeheim --csv ./Bewertungen.csv --supinfolder ./supplements --sup 1 --zip ./submissions.zip
```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment