Commit 9e59e417 authored by Olivier's avatar Olivier
Browse files

M7: G-code for peers now has an "A" or a "B" suffix

parent c2019497
......@@ -14,28 +14,33 @@ cd $outputfolder
# Copy grading form to work folder (it’s the same file for all )
cp -v form/gradingform.pdf ./form.pdf
# Pick up all the files in input subfolder one by one
# Pick up all the "A" files in input subfolder one by one
for submissionpdf in submissions/*.pdf; do
# Extract IDG code from submission pdf file name
IDG=$(echo "$submissionpdf" | sed -r 's/submissions\///' | sed -r 's/\.pdf//')
# Construct IDGA and IDGB codes out of IDG code
APPENDA='A'
APPENDB='B'
IDGA=$IDG$APPENDA
IDGB=$IDG$APPENDB
echo "#"
echo "#"
echo "building assignment PDF for $IDG …"
mv -v solutions/solution1_$IDG.pdf ./solution.pdf
mv -v solutions/solution*_$IDG.pdf ./solution.pdf
mv -v submissions/$IDG.pdf ./submission.pdf
# Concatenate all three PDFs that we have together now
# Note that pdftk is not available by default on Ubuntu 18.04,
# see https://askubuntu.com/a/1046476 for workaround install
pdftk A=solution.pdf B=submission.pdf C=form.pdf cat A B C output done/$IDG.pdf
pdftk A=solution.pdf B=submission.pdf C=form.pdf cat A B C output done/$IDGA.pdf
# Create clone of PDF file with B code
cp -v done/$IDGA.pdf done/$IDGB.pdf
# When the file returns filled from each student, we may use
# the following command to get only the last page
#pdftk returnfile_filled.pdf cat r1 output onlythefilledform.pdf
done
......
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