Frustrated college math prof here hoping for a little holiday relief.
Summary of the problem:
I have files downloaded from Blackboard LMS for my class of >100 students. Some students submit multiple files and sometimes in non-pdf format. I'd like to combine each student's submitted files into a single pdf for that student. Currently I am doing this manually with Acrobat. It's very tedious.
I'm hoping somebody can direct me to or help me concoct a bash script which can combine these files more auto-magically?
I have 130 students this semester. Their final written assignment has been submitted through my college's Blackboard LMS.
Unlike Canvas, Blackboard does not allow professors to specify/limit allowed file types or limit the number of files submitted. Blackboard does NOT offer an option to automatically combine files into a pdf. Why not? I don't know.
The files come together in a zip file and when I unzip, the files are in the following format in a single folder:
<AssignmentName>_<Student1ID>_attempt_<datestamp>.txt <AssignmentName>_<Student1ID>_attempt_<datestamp>_<SubmittedFile1>.jpg <AssignmentName>_<Student1ID>_attempt_<datestamp>_<SubmittedFile2>.jpg ... <AssignmentName>_<Student2ID>_attempt_<datestamp>.txt <AssignmentName>_<Student2ID>_attempt_<datestamp>_<SubmittedFile1>.jpeg <AssignmentName>_<Student2ID>_attempt_<datestamp>_<SubmittedFile2>.jpeg ... etc.
The .txt file contains general information about the student's submission.
WrittenAssignment2_40012345_attempt_2021-12-13-20-36-46.txt WrittenAssignment2_40012345_attempt_2021-12-13-20-36-46_IMG3047.jpg WrittenAssignment2_40012345_attempt_2021-12-13-20-36-46_IMG3048.jpg WrittenAssignment2_40012345_attempt_2021-12-13-20-36-46_IMG3049.jpg WrittenAssignment2_40067890_attempt_2021-12-14-16-22-39.txt WrittenAssignment2_40067890_attempt_2021-12-14-16-22-39_AssignmentDoc.pdf WrittenAssignment2_40098765_attempt_2021-12-12-20-08-52.txt WrittenAssignment2_40098765_attempt_2021-12-12-20-08-52_MyUploadPg1.pdf WrittenAssignment2_40098765_attempt_2021-12-12-20-08-52_MyUploadPg2.pdf WrittenAssignment2_40098765_attempt_2021-12-12-20-08-52_MyUploadPg3.pdf ...
Many students do successfully submit single pdfs, but many do not. I have tried various social engineering techniques to get them to submit single multi-page pdfs, including instructions on submitting single pdfs, or giving a mark of 0 for non-compliance, but this just generates MORE headache.
What I would like is to read the list of .txt files, then combine each group of related pdf or jpgs into a single pdf and put the output as
So that I have only a single file to mark for each student. Thanks so much.