exam-scan issueshttps://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues2023-06-02T13:05:20+02:00https://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/11Moodle 4 support2023-06-02T13:05:20+02:00Amrita Deb DuttaMoodle 4 supportThe tool doesnt work with the submission zip file generated by Moodle 4. This is because the folders are named like "{fullname}_{moodleid}_assignsubmission_file" instead of "{fullname}_{moodleid}_assignsubmission_file_"
## Criteria
* [x...The tool doesnt work with the submission zip file generated by Moodle 4. This is because the folders are named like "{fullname}_{moodleid}_assignsubmission_file" instead of "{fullname}_{moodleid}_assignsubmission_file_"
## Criteria
* [x] Include the foldername format of Moodle 4
* [x] Can the code be so customised that it handles moodle 4 and earlier versions together
* [x] Customise testsAmrita Deb DuttaAmrita Deb Duttahttps://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/12Exam Scan: Überschüssige temporäre Daten2023-06-02T13:05:48+02:00Amrita Deb DuttaExam Scan: Überschüssige temporäre DatenMr. Michal Blomberg reported this problem as follows:
> magick creates a huge amount of temporary data (AppData\Temp on Windows). We would have loved to use the HPC Linux cluster, but would have required root access for the installation....Mr. Michal Blomberg reported this problem as follows:
> magick creates a huge amount of temporary data (AppData\Temp on Windows). We would have loved to use the HPC Linux cluster, but would have required root access for the installation.
It’s about 30 MB per Page, so we could generate around 14 scripts until the SSD ran full (with 150 GB still open before starting the process).
For our relatively small lecture that was not an issue, we’ve just split the process. But we also have a 500+ people lecture on the horizon for the topic, so it would be great if you could follow up on that and purge the temp-files in between PDFs.
## Akzeptanzkriterien
* [ ] Ursache finden
* [ ] Workaround: Gib eine Warnung heraus, damit die Leute Bescheid wissen und es nicht selbst herausfindenhttps://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/13Exam Scan : Kompatibilität mit Macbook M12023-05-25T14:26:51+02:00Amrita Deb DuttaExam Scan : Kompatibilität mit Macbook M1Ein Kunde hat ein Problem mit dem Exam Scan Script gemeldet, das auf M1 Macs nicht kompatibel ist. Wir müssen es testen und das Inkompatibilitätsproblem lösen
## Akzeptanzkriterien
* [ ] Test out with Harald's latest Mac
* [ ] Kan n...Ein Kunde hat ein Problem mit dem Exam Scan Script gemeldet, das auf M1 Macs nicht kompatibel ist. Wir müssen es testen und das Inkompatibilitätsproblem lösen
## Akzeptanzkriterien
* [ ] Test out with Harald's latest Mac
* [ ] Kan nachstellen: we need new M1 Mac Geräte zu testen und entwickeln
* [ ] nicht nachstellen: communicate with Kunden and have a meeting to find out what the problem ishttps://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/14Exam Scan: PDF-Sortierung auf der Basis von QR-Codes2023-05-25T14:49:59+02:00Amrita Deb DuttaExam Scan: PDF-Sortierung auf der Basis von QR-CodesEs wäre hilfreich, wenn alle gescannten Antwortskripte auf Basis der QR-Codes sortiert werden könnten.
## Anforderungen
* [ ] bei Tim Kemperdick Bescheid sagen, dass wir das so kurzfristig nicht implementieren können
* [ ] Harald fragt ...Es wäre hilfreich, wenn alle gescannten Antwortskripte auf Basis der QR-Codes sortiert werden könnten.
## Anforderungen
* [ ] bei Tim Kemperdick Bescheid sagen, dass wir das so kurzfristig nicht implementieren können
* [ ] Harald fragt bei Christian Rohlfing nach ob jemand anders das übernehmen kann
* [ ] warten auf Beispiel-Antwortskripte mit QR-Codes von Tim Kemperdick
* [ ] Der Code scannt den QR-Code Seite für Seite, wenn sich die Matrikelnummer im QR-Code ändert, behandelt der Code dies als Ende einer Abgabe und Beginn einer neuen
* [ ] erstellt PDFs auf der Basis der oben genannten Logik vor
## Anmerkung
Review findet am 22. Juli statt, also müssen vorher fertig werden.Amrita Deb DuttaAmrita Deb Duttahttps://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/10Misc: Add support for Dynexite2022-02-16T14:21:54+01:00Christian Rohlfingrohlfing@ient.rwth-aachen.deMisc: Add support for DynexiteFor the scenario of using the file-upload-task in Dynexite, it would be useful to enable exam-scan to handle not only Zip-files exported from Moodle (containing the scanned exams of each student), but also the exported Zip-file from Dyne...For the scenario of using the file-upload-task in Dynexite, it would be useful to enable exam-scan to handle not only Zip-files exported from Moodle (containing the scanned exams of each student), but also the exported Zip-file from Dynexite.Christian Rohlfingrohlfing@ient.rwth-aachen.deChristian Rohlfingrohlfing@ient.rwth-aachen.dehttps://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/9Misc: suggested enhancements and mini bugs in handlemoodlesubmissions.py and ...2023-06-26T10:33:20+02:00Hermann WesterholtMisc: suggested enhancements and mini bugs in handlemoodlesubmissions.py and matnum.pyThe following list contains a few annoyances (not necessarily bugs) that I have run into; other users may benefit from them being fixed. Most of these mini issues are easily resolved and I'm happy to contribute but I am not able to work ...The following list contains a few annoyances (not necessarily bugs) that I have run into; other users may benefit from them being fixed. Most of these mini issues are easily resolved and I'm happy to contribute but I am not able to work on this right away. Hence the list :)
- `handlemoodlesubmissions.py`
- [x] Documentation: Add note that checkbox "Download submissions in folder" has to be checked prior to downloading sumbmissions, or
- [x] Improvement: accept submissions that were **not** downloaded in individual folders
- [ ] (Possible) bug: `folder_instead_of_zip` functionality appears to be broken due to some `if`/`else` checks not doing what they are supposed to do
- `utils/matnum.py`
- [x] Improvement: Accept file names containing nothing but matriculation number (e.g. `123456.pdf`). Achieved by teaching `_extract_matnum` to not rely on presence of underscores.
Feedback always welcome.https://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/8Improvements2021-05-05T13:10:58+02:00Amrita Deb DuttaImprovements
# Acceptance criteria
* [x] Revise repo structure as follows:
```
assets/
fonts/...
images/...
tmp/.gitkeep
utils/
matnum.py
tests/
test_watermark.py
test_encrypt.py
test_batch.py
test_pr...
# Acceptance criteria
* [x] Revise repo structure as follows:
```
assets/
fonts/...
images/...
tmp/.gitkeep
utils/
matnum.py
tests/
test_watermark.py
test_encrypt.py
test_batch.py
test_preparemoodle.py (t.b.d)
assets/
Bewertungen.csv
scans/
123456_blalba.pdf (1 bigger PDF with scans (16 pages)
456789_Last.pdf
supplements/
exam-questions.pdf (1 PDF non-scan (created with word / latex)
exam-solution.pdf
submissions.zip
docs/
Depend....md
swdep.....md
FAQs.md
```
* [x] Dockerfile, conda, virtual env instructions -> Christian
* [x] improve README
* [x] remove python3 commands
* [x] instruct people to play around with dpi and quality
* [x] Warn about zip size
* [x] student grading info extraction in separate function under utils -> Christian
* [x] infolder outfolder make them positional arguments
* [x] prompt when input folder is empty
* [x] rename scan
* [x] Dev: Christian
* [x] Test: Amrita
* [x] ~~preparepdf~~ handlemoodlesubmissions
* [x] unsupported/empty folder info at the very end cumulatively
* [x] Dev: Christian
* [x] Testing: Amrita
* [x] dry run functionality
* [x] Dev: Christian
* [x] Testing: Amrita
* [x] grading info implementation
* [x] Dev: Christian
* [x] Testing: AmritaChristian Rohlfingrohlfing@ient.rwth-aachen.deAmrita Deb DuttaChristian Rohlfingrohlfing@ient.rwth-aachen.dehttps://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/7File extension case sensitivity2021-04-27T16:15:06+02:00Christian Rohlfingrohlfing@ient.rwth-aachen.deFile extension case sensitivityFor example, in `watermark.py` (but happens in other files as well), PDF files are identified as `*.pdf`. Some PDFs are named `*.PDF`, they are not found right now. Add `.lower()` to prevent this, e.g. `_.lower().endswith('.pdf')`.For example, in `watermark.py` (but happens in other files as well), PDF files are identified as `*.pdf`. Some PDFs are named `*.PDF`, they are not found right now. Add `.lower()` to prevent this, e.g. `_.lower().endswith('.pdf')`.Amrita Deb DuttaAmrita Deb Duttahttps://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/6Feature request prepare_moodle: Automatic split of zip files if 250MB mark is...2021-04-28T18:11:04+02:00Mathias Wienwien@lfb.rwth-aachen.deFeature request prepare_moodle: Automatic split of zip files if 250MB mark is exceeded- Moodle only accepts uploads of files smaller than 250MB.
- The tool should monitor the expected file size and automatically split into multiple zip files if the critical size might be exceeded.- Moodle only accepts uploads of files smaller than 250MB.
- The tool should monitor the expected file size and automatically split into multiple zip files if the critical size might be exceeded.https://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/5watermark: excessive disk usage2023-07-10T08:50:48+02:00Mathias Wienwien@lfb.rwth-aachen.dewatermark: excessive disk usage## package versions:
- python 3.9 with `pip3 install wand pillow PyPDF2 pwgen pikepdf` installed on 2021-04-22
- ImageMagick 6.9.7-4 Q16 x86_64 20170114
- Ghostscript version 9.50
## problem
- apparently no garbage collection in local `...## package versions:
- python 3.9 with `pip3 install wand pillow PyPDF2 pwgen pikepdf` installed on 2021-04-22
- ImageMagick 6.9.7-4 Q16 x86_64 20170114
- Ghostscript version 9.50
## problem
- apparently no garbage collection in local `/tmp/` folder on machine. Tons of files like `/tmp/magick-11240N0pYJKPD4KyY`, 47MB each remain. Redirect using `--tmp <directory>` does not help.
## Workaround
* Lower DPI
* Give a temporary directory path(with enough space) as parameter where the imagemagick temporary files will get dumped => https://git.rwth-aachen.de/rwthmoodle/exam-scan/-/merge_requests/57https://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/4Some pdf pages turn out black due to alpha channel2021-04-28T10:18:55+02:00Rafael GoldbeckSome pdf pages turn out black due to alpha channelSome pdf pages converted by watermark.py get an entirely black background in the current state of the script. Removing the transparency alpha channel worked out for me:
def watermark_img(img_file, template, dpi):
"""Watermarks image...Some pdf pages converted by watermark.py get an entirely black background in the current state of the script. Removing the transparency alpha channel worked out for me:
def watermark_img(img_file, template, dpi):
"""Watermarks image with watermark template
Args:
img_file (str): path to image file
template (PIL.Image.Image): watermark template
dpi (int): dots per inch
Returns:
str: path to watermarked image
"""
# Open image
image = Image.open(img_file).convert('RGBA')
image = remove_transparency(image) # <------------------ Add this line in watermark_img call
width, height = image.size
[...]
def remove_transparency(im, bg_colour=(255, 255, 255)): # <------------------ Add this function
# Only process if image has transparency
if im.mode in ('RGBA', 'LA') or (im.mode == 'P' and 'transparency' in im.info):
# Need to convert to RGBA if LA format due to a bug in PIL
alpha = im.convert('RGBA').split()[-1]
# Create a new background image of our matt color.
# Must be RGBA because paste requires both images have the same format
bg = Image.new("RGBA", im.size, bg_colour + (255,))
bg.paste(im, mask=alpha)
return bg
else:
return imhttps://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/3Feature request: Unterstützung für Bereitstellung personalisierter Musterlösu...2021-02-08T15:53:24+01:00Mathias Wienwien@lfb.rwth-aachen.deFeature request: Unterstützung für Bereitstellung personalisierter MusterlösungenEs wäre sehr hilfreich, neben der eingescanten und gewatermarkten Klausur auch eine gewatermarkten Musterlösung mit in das Paket für den Moodle-Upload packen zu können. Bisher lässt sich das nur mit Trickserei erreichen.
Das Feature wär...Es wäre sehr hilfreich, neben der eingescanten und gewatermarkten Klausur auch eine gewatermarkten Musterlösung mit in das Paket für den Moodle-Upload packen zu können. Bisher lässt sich das nur mit Trickserei erreichen.
Das Feature wäre für alle Lehrstühle interessant, die keine Musterlösungen veröffentlichen sondern nur zur Einsicht zur Verfügung stellen möchten. Durch das Watermarking der Musterlösung wäre ein deutliches Signal gegen die Weiterverbreitung der ML gesetzt.
Typischerweise gäbe es dabei ein Quellfile, was für jede/n Teilnehmer/in der Einsicht mit der persönlichen Matrikelnummer versehen wird. Dieses gewatermarkte File sollte dann zusammen mit dem Scan der Klausur im Ordner für die entsprechende Matrikelnummer bereitgestellt werden, sodass die Musterlösung neben der Klausur in Moodle zur Verfügung steht.https://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/2Bug in prepare_moodle for English Moodles2020-11-19T16:45:52+01:00Christian Rohlfingrohlfing@ient.rwth-aachen.deBug in prepare_moodle for English Moodles[Line 97](https://git.rwth-aachen.de/rwthmoodle/exam-scan/-/blob/master/preparemoodle.py#L97) in `preparemoodle.py` only works for German Moodles.
Was already fixed for the bash version:
https://git.rwth-aachen.de/rwthmoodle/exam-scan/...[Line 97](https://git.rwth-aachen.de/rwthmoodle/exam-scan/-/blob/master/preparemoodle.py#L97) in `preparemoodle.py` only works for German Moodles.
Was already fixed for the bash version:
https://git.rwth-aachen.de/rwthmoodle/exam-scan/-/commit/f4c4b170847bbe9c7b171b73b53798e24c743427Amrita Deb DuttaAmrita Deb Duttahttps://git.rwth-aachen.de/rwthmoodle/exam-scan/-/issues/1preparemoodle.py : ZeroDivisionError with less than 6 lines in Bewertungen.csv2020-11-19T16:16:47+01:00Jan Gruispreparemoodle.py : ZeroDivisionError with less than 6 lines in Bewertungen.csvWith a Bewertungen.csv with less than 6 lines preparemoodle.py stops at
line 124 `if not (cnt % round(numlines/10)):`
with a ZeroDivisionError because round(numlines/10) = 0 (numlines <6)
Not really that important, because only happen...With a Bewertungen.csv with less than 6 lines preparemoodle.py stops at
line 124 `if not (cnt % round(numlines/10)):`
with a ZeroDivisionError because round(numlines/10) = 0 (numlines <6)
Not really that important, because only happens when _testing_ with a few files.