Is it possible to do intermediate processing of scans?

Added by S. McKay about 9 years ago

Hi all,

It's me again, trying to make my tablet grading software more efficient. Of course, it wouldn't work at all without AMC, so I'm very happy. I'm just trying to make things run better.

Let me tell you what I would like to do, and hopefully you can tell me if that is easy, hard, or requires a major rewrite of the code. Once the students take the exam, and the exams are scanned in,I would like to send the scans through AMC for the purposes of collating exam pages. For example, suppose I wish to collate all pages of the question named Q11 in my exam, because Q11 needs to be graded by the instructor. Since Q11 may not be on the same page for every exam, I would like to take the pages corresponding to Q11 and put them in the same pdf file, in order. Then I can give the pdf file to the instructor, who will grade it. (Let's assume for now that there is only one question per page). After the instructors grade their pages, I can then send the pdf back through AMC for grading. Is this possible? I know that when I send files through to AMC that jpg files like page-6-4.jpg are created, but these are not appropriate for grading, because they have the boxes outlined. I guess I could use them, but I don't know what would happen if I sent that through twice.

Is there a way to do what I need to do? I know all the information I need is in AMC, but I don't know if I can use it the way I want ...

Any help is appreciated.


Replies (2)

RE: Is it possible to do intermediate processing of scans? - Added by Alexis Bienvenüe about 9 years ago

This will be easier if you don't use photocopy mode. When not in photocopy mode, if you submit multiple times the same page for automatic data capture, the last submission replaces all previous submissions.
Here are some clues:

First, get the AMC internal question number associated with the question id you used in your source file (I assume here it is Q11): in your project directory, type

sqlite3 ./data/layout.sqlite 'SELECT question FROM layout_question WHERE name="Q11"'

You can get the student/page where this question (say you got 10 from last command) is with

sqlite3 ./data/layout.sqlite 'SELECT student,page FROM layout_box WHERE question="10" GROUP BY student,page'

For each student/page pair (use 8|2 as an example), you can get the associated scan with

sqlite3 ./data/capture.sqlite 'SELECT src FROM capture_page WHERE student="8" AND page="2"'

All these SQL queries may be combined into one using some JOINtures...

Finally, use pdftk to concatenate all the single-page PDFs.

RE: Is it possible to do intermediate processing of scans? - Added by S. McKay about 9 years ago

Thanks! I'll give that a try. I am not in photocopy mode because the exams have boxes on multiple pages.

Another question: when I run the scans through AMC, do I need the option "copy files to project directory"? I am currently not using that because I am using my own software to split the pdf (and I do it in the scan folder).

(1-2/2)