(This documentation uses the present tense, but that's because the documentation is out of date too. You should no longer be using the old version, which is not compatible with current file formats used by the Faculty of Arts and Science for class lists and final grade reporting.)
The program grade is a grading "shell" that will allow you to call all the grading programs without knowing where they are, and also provides easy access to help on various topics. It allows you to use the usual UNIX commands too. Of course you don't have to use grade to call the standard grading programs:
If you give a file name alone and leave the options unspecified, these programs will ask you how to behave. Alternatively, you can give command-line options to escape interrogation. Besides the standard programs, you can use any editor to make small changes to a file. For example, vi can be used to add a new student, delete an old one, or to add, change or delete a mark (input or computed).
Here is a sample file in the proper format.
CSC 999F Hull's section tutor: Clarke A0 / 10 *Warm-up assignment test/50 *Mid-Term esay / A pcnt = test : 100 *test, percent term = A0:12.5 test:25 esay:12.5 exam / 100 grad = term:50 exam:50 ! 1 fncy = A0:15 test esay exam: 20 15 0 exam:50 + 3 ! A 865935401 Sevcik K.C. 8 45 B 90 42 60 71.9 B 862321068 Corneil, Chief D.G. 6 20 C+ 40 26 70 61.0 B- 867635900 Cook S.A. 2 A 13 80 53.4 B 864896971 Holt, Richard C. 10 32.5 D-lat65 35 90 80.1 A+ 997828948 Borodin Big Al 3 51cheC- 102 37 100 86.9 A+
This file has two parts: a "header" containing preliminary information, and a section containing students' records. The header and the student section are separated by one empty line.
The first line of the header is the course name and any other identifying information in free format. Each subsequent line (from 1 to 30 of them) describes one column of marks. The mark descriptions begin with the identifier: from 1 to 4 characters not including a blank or any of these reserved characters:
/ = : + - ! *
A mark is either input or computed from other marks. For an input mark, the identifier is followed by a slash '/' and then the amount the students' work is out of -- either a number (not zero) or the letter 'A' if it is a letter grade. At the end of the line there may be an asterisk '*' followed by a comment. In our sample file, marks A0, test, esay, and exam are input marks; pcnt, term, grad, and fncy are computed.
For a computed mark, the identifier is followed by an equal sign and then a formula to say how to compute the mark as a weighted sum of other marks. A computed mark may depend on any previous mark. In our sample file, term is computed from A0, test, and esay by first normalizing them, then giving A0 weight 12.5, test weight 25, and esay weight 12.5. A computed mark is out of the sum of the weights, which must not be zero. Hence term is out of 50.
In the formulas for computed marks, you can also add or subtract numerical constants. (Added constants are considered to have zero weight.) The way the mark is displayed can optionally be affected by a format -- an exclamation mark '!' followed by either a number of decimal places (at most 2) or the letter 'A', indicating that the computed mark is to be converted to a letter grade. As with input marks, computed marks can be followed by a comment.
In our sample file, grad is printed with one decimal point, and fncy illustrates the generality of computed marks: a group of marks may have a group of weights, so that the best mark of the group (after normalization) is given the first weight, the second-best mark is given the second weight, etc. A mark may appear in one group, in more than one group, or in no group. We compute fncy as follows: A0, test, esay and exam are normalized; A0 is given weight 15; for each student, the best result of test, esay, and exam is given weight 20; the second-best result of test, esay, and exam is given weight 15; the worst result of test, esay, and exam is not counted; exam is given additional weight 50; then 3 is added and the result is converted to a letter grade for printing.
The treatment of calculated letter grades is rather peculiar, so it is forbidden to use them in further calculations.
Students' records are given, one per line, as follows: student number in columns 1 to 9 (where the first column is numbered 1, not 0); a blank in column 10, student name in columns 11 to 30; student marks every five columns thereafter, i.e. 31 to 35, 36 to 40, 41 to 45, etc. Student numbers, names and marks may be left blank. For sorting, a name should start in column 11, family name first. A mark need not be an integer, and can be anywhere in its field. Unused space following a mark may be used for comment. DO NOT USE TABS.
On CS Lab machines, the grading programs are in /local/bin/grade/old, and the manual pages are accessible with the usual "man" command.