The Key File

The key file is usually generated by grtex and used by grfix, and does not need to be looked at by humans. But, if you discover you have made a mistake on the exam, you may need to modify the key file (or part of the *.ok file from grfix which was copied from the key file.)

A possible key file could look as follows. Note that all features are included in the example. If Mult=0 and/or Credit=0, the lines which would otherwise hold such information are excluded.

When students are added to the key file (by grfix or simply concatenating the key file and the *.ms file from gread or greadf), the file is ready to be read into grad. It is often called an *.ok file (since it is checked by grfix).

The students as read in by greadf use two lines for the numerical questions, though the seond line is blank if there are eight or fewer questions.

A possible numerical answers key file:

Exam II -- Physics 123 -- April 1, 2003  Richard J. Plano
NumKor  Date   Num MC  Ver  Mult   Max   Wrong  Credit  Sort  Extra
  123 030228   2, 4    4    2    20,20   2, 1    1,     5,9    0
NumPen: 2 3
MCCred: 3 7 6 4
MCPen:  1 4 3 2
  3  2 12     6  4 245
 10.0, 5.0, -5.00E+05,   -6.00E+05, -4.00E+05, -9.00E+05, -1.00E+05
            -5.00E+05,   -6.00E+05, -4.00E+05, -9.00E+05, -1.00E+05
            -5.00E+05,   -6.00E+05, -4.00E+05, -9.00E+05, -1.00E+05
            -5.00E+05,   -6.00E+05, -4.00E+05, -9.00E+05, -1.00E+05
  5.0, 1.0,  125.0,
             125.0,
             125.0,
             125.0,
MASTER A                                    2343
MASTER B                                    1523
MASTER C                                    2251
MASTER D                                    4452
A   1-4       2-1       3-1
B   2-3       3-4       1-2
C   4-1       3-2       2-4
D   3-2       1-3       4-3
  Master A  Master B  Master C  Master D
  16 12345  19 53142  17 42513  18 41532
  17 12345  16 51423  16 32514  17 43215
  18 12345  17 43125  19 25431  16 15234
  19 12345  18 43125  18 25431  19 15234
Einstein, Albert      11231234567891238701012342
 138     842-1

Plano,Richard J       01                 1021532
 138     842+1

A possible multiple choice only exam key file:

Exam II -- Physics 123 -- April 1, 2003  Richard J. Plano
Kourse  Date   NQUES  Ver  Mult   Max   Wrong  Credit  Sort  Extra
  123 030228     4     4    2      20     1     1       5    0
MCCred: 3 7 6 4
MCPen:  1 4 3 2
  3  2 12    6  4 245   
MASTER A                                    2343
MASTER B                                    1523
MASTER C                                    2251
MASTER D                                    4452
  Master A  Master B  Master C  Master D
  16 12345  19 53142  17 42513  18 41532
  17 12345  16 51423  16 32514  17 43215
  18 12345  17 43125  19 25431  16 15234
  19 12345  18 43125  18 25431  19 15234
Einstein, Albert      11231234567891238701012342
Plano,Richard J       01                 1021532

The first three lines are identical to those in the Want File. The next three lines (two for a MC exam), which are present only if Credit.ne.0, give the penalties for numerical questions (NumPen:) and the credits and penalties for MC questions. Remember that if the credits and penalties are the same for all questions, they can be assign by Max and Wrong; Credit overrides those assignments. The credit for numerical questions is always given in the question's first line.

The next line is present only if Mult is non-zero. It allows incorrect answers to multiple choice questions to be given credit. In this example, answers 1 and 2 (A and B) for question 2 will be given 3 points and answers 2, 4, and 5 to question 4 will be given 6 points. If the credit is zero or blank, the same credit is given for these answers as for the normal correct answers.
Format is 5(I3,I3, 1X, 4A1). This means the three digits for number of points, three digits for question number, then a blank, then 4 digits for answers to get credits. 11 characters per question, 5 questions to a line
The first multiple choice question in a numerical exam is question 16.

The next lines (up to 75 = 15*5 for 15 questions with 5 versions each) provide the credits, correct answer, and answer limits for full and partial credit for all versions of the numerical questions; these numbers are taken directly from the Question File. If the answer limits are omitted, a percentage allowable error is used, currently 2% for full credit and 10% for partial credit.

The next lines contain the correct answers for up to 30 multiple choice questions for each version. These are also taken directly from the Question File.

The next four lines show the question order and the question variation used for the three numerical questions. Then comes a header line followed by the scrambled question and answer order for the 30 multiple choice questions.

Finally we come to the student answers, which are added to the key file by GRED or by the UNIX cp command to produce the OK file. For each student the first line contains the student's name (AAAAABBBBBCCCCCDDDDD), two spaces, the date without the year (1123), his student number (123456789), the course (123), his section (87) and exam code (0101) followed by his answers to the multiple choice questions.

The next two lines contain the student's answers to the numerical questions; the format is 8(i4,i3,1x). So the first student's answers are: 1.38, 8.42E-01, and -2.92.


Criticisms or additions to this page should be sent to
Joel Shapiro
(shapirophysics) Last modified: Tue Dec 15 10:35:25 2015