Printing the Exams Individually with Labels

Version by Pieter Jacques and Joel Shapiro

If you are making exams with grtex for a large course, you need to have an exam code printed on each exam, and this is often done with a label on the cover page. We can now prepare the exams so that a label with the code, the student's picture, and other information is printed directly on the cover sheet. These are the instructions for doing that, so the student labels printed directly on the Ricoh copy machines, rather than using pasted-on labels.

This is for doing this on one of the Department Unix/Linux machines. If you want to do most of the work on your own machines, see Making grtex exams with labels on your own computer

0) You will only be able to print the exams without help if you are in the crsadmin group. Check by executing
cat /home/shapiro/amIcrsadmin
If it denies permission, ask our IT staff to add you to the crsadmin group.

1) To start, cd to the directory in which you run grtex and can successfully run latex on the output. Let's call it "makeexams" .

2) Download a copy of grtexWLBL , and then
tar xvf grtexWLBL.tar
As untarred, there will be new files cover.wscan, cover.noscan, lbltempl.tex, note2secy, sendprint, studlabel.tex and a symbolic link pix, as well as a copy of these instructions InstructSun.

3) You need to have a "cover" file and you must have \input cover in the header page of your grtex input file. Your "cover" file must include the lines
\input studlabel
\input lbltempl
in the place where the exam label should be. If you are printing the answer sheet on the cover, you will also need to include it. The file cover.wscan gives an example of doing so, while cover.noscan is an example using the mark sense forms.
You might want "cover" to be a symbolic link to your exam's cover file. If you want to try the sample, ln -s cover.wscan cover (or cover.noscan). You can make a "tail" file with content if you want, or else touch tail. Run grtex and let us call the output of this grtex command xxxExam.e

4) Copy your roster from /home/sysmgmnt/registration/rosters, file crsnum.csv (where crsnum is your three digit course number)
Note: this will print your exam in alphabetic order. If you prefer them to be ordered by section, and alphabetic within sections, execute
./doSectOrder crsnum.csv new.csv
mv new.csv crsnum.csv
There is another opportunity to reorder by hand in step 6(b).

At this point, you have (among others) the files xxxExam.e, cover, lbltempl.tex, tail, xxx.csv and a directory pix (linked to pictures in /home/sysmgmnt/registration/pictures/)

5) Decide what is to be the lowest numbered exam. The default is 101. If you want to change that, add the number as one more argument to the makestudlbl command. Below I have used 51, but leave it off to get 101

6) Now it is time to execute a bunch of commands:
(a) breakgrtex xxxExam.e
this will make the multiple versions
(b) makestudlbl xxx.csv homestud numextras 51
This makes homestud, extracted from the roster file, containing one line per student, with their ID, section, exam code, last name and first name. numextras is the number of extra exams with exam numbers to prepare without names. One additional one will be prepared without an exam code as well. It starts numbering at 51, which is unusual, though leaving out the last argument will start numbering at 101, as usual.
homestud (which you can all whatever you like) contains an ordered list of students. You can reorder them if you like.
(c) The next step can make trouble if xxxExam.e doesn't latex okay, so first try that out. If it is okay,
makeIndivLtx xxxExam numver crsnum homestud tests
Here numver is the number of versions, and crsnum is the course number. This makes the individual exams and places them in subdirectory "tests", which must have been either be nonexistent or empty beforehand.

7) Decide if you want your exams printed on both sides of the paper (duplex) or only on one side (simplex). Once you have checked everything out, tell your secretary you are ready to have the exams printed, probably by sending email as described in note2secy. She should then get back to you saying she is ready for you to submit the exams which will be printed within the next day, approximately, and telling you which printer to use, either 7503 or 6503. Then you should log onto, cd to makeexams, and execute:
./sendprint crsnum homestud outdir secy printer plex &
where "crsnum" is your 3 digit course number as told to your secretary, "outdir" is the subdirectory with the exams (called tests above), "secy" is the Physics username of the secretary in charge (currently either "ndh" (nancy@physics) or "smiller" (Stephanie), "printer" is either 7503 or 6503 (as instructed by secretary), and "plex" is either "duplex" or "simplex". The & runs the sendprint program in background, because sendprint must run until the exams are all printed. The exams will not be printed until the secretary gives the goahead by touching /home/secy/printnow/crsnum.
Thereafter, executing lpq -P PHYS-221-RMP7503 (or RMP6503) should list all the exams not yet printed.
Last modified: Tue May 23 16:00:34 2017