Commit 8f557c14 authored by Olivier's avatar Olivier
Browse files

All: assignment number/suffix is now start-of-script variable

parent d2b4d29b
#!/bin/bash
# Assignment suffix
ASSGTSUFFIX='example'
# Input parameters
inputfolder='script_input-real'
outputfolder='script_output-real'
......
......@@ -26,7 +26,7 @@ for submissionpdf in submissions/*.pdf; do
echo "#"
echo "building assignment PDF for $IDA …"
mv -v solutions/solution_graded_$ASSGTSUFFIX_$IDA.pdf ./solution.pdf
mv -v solutions/solution_graded_${ASSGTSUFFIX}_$IDA.pdf ./solution.pdf
mv -v submissions/$IDA.pdf ./submission.pdf
# Concatenate all three PDFs that we have together now
......
......@@ -3,6 +3,12 @@
Author: Germán Santa-Maria
Script: Email Assignments
"""
###########################################################################
# Parameters specific to assignment exercise
# Number of assignment
assignment_suffix = "_example"
###########################################################################
"""-------------------------Hard coded input--------------------------------"""
# Input file paths
......@@ -60,7 +66,7 @@ with open(input_csv_path, newline='') as f:
custom_ID_G.append(row[4])
for ID in custom_ID_A:
attachment_name = "assignment1_"+ID+".pdf"
attachment_name = "assignment"+assignment_suffix+"_"+ID+".pdf"
attachments.append(attachment_name)
# Make sure that all the attachments are in the script_input folder by looking
......
#!/bin/bash
# Assignment suffix
ASSGTSUFFIX='example'
# Input parameters
inputfolder='script_input'
outputfolder='script_output'
......@@ -12,7 +15,7 @@ cp -vrf $inputfolder/* $outputfolder/
cd $outputfolder
# Copy grading form to work folder (it’s the same file for all )
cp -v form/gradingform.pdf ./form.pdf
cp -v form/form_$ASSGTSUFFIX.pdf ./form.pdf
# Pick up all the "A" files in input subfolder one by one
for submissionpdf in submissions/*.pdf; do
......
......@@ -3,6 +3,12 @@
Author: Germán Santa-Maria
Script: Email Grading Forms
"""
###########################################################################
# Parameters specific to assignment exercise
# Number of assignment
assignment_suffix = "_example"
###########################################################################
"""-------------------------Hard coded input--------------------------------"""
# Input file paths
......
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