The DCS grading programs — grecol

Grecol allows a variety of changes to the marks in a grades file:

These changes are applied both to the mark definitions in the grades-file header and to the data in each student record.

These are interestingly powerful operations, and are needed only if you conclude there are serious flaws in the previous organization of your file. You might be better off creating a new grades file and using gcopy to copy marks from the old file to the new one. Still, grecol should be amusing.

Usage

grecol [-?] [-9] [-c] [-m marklist] [files]

Details

Here are the options allowed by these three programs.

-9 Use nine-digit student numbers in the output files, if possible.
-c Clear any non-empty marks that would be removed.
-m marklist Rearrange the marks according to the tokens found in marklist, which must be a quoted string if it contains spaces.
 

The tokens in the mark list are either names of existing marks or asterisks ('*'). An asterisk indicates that a new mark is to be inserted at that point both in the header and in each student record. The named marks need not include all existing marks, may include the same name more than once, and may be in any order. Duplicated marks appear twice (or more often) in the header, and the values are correspondingly duplicated in each student record.

If you omit the -m option, grecol queries you for the mark list, provided that you are working with named files rather than the standard input.

The -c option tells the program to clear any non-empty marks that are not included in the mark list. If the -c option is omitted and there are non-empty marks, grecol asks you what to do, but only if it is not reading its grades-file input from the standard input; if it is reading the standard input, it fails with an error message. We need your authorization before destroying your data.

Grecol does not accept selection options, because you can't reorganize the marks for just some of your students.

Gremove rebuilds the grades-file header for you, but unless you are simply removing marks (in which case, consider gremove), the new header is bound to be incorrect. Consequently, grecol leaves the entire previous header in place but commented out, so that you can refer to it when fixing up the new header.

For example, suppose the mark file "mygrades" defines four marks, m1, m2, m3 and m4. Let's give this command:

grecol -m "m2 * * m1 m4" mygrades

After grecol has done its work, "mygrades" has five marks: one the same as the original m2, then two completely new ones, then the original m1, and finally the original m4. The original m3 has vanished. The grades-file header is now illegal, as can easily be seen by reading it.