Back

gradebookdisplay

This is a command line program that is executed by running gradebookdisplay with some subset of specified options and corresponding values.

The set of allowed options are {-N, -K, -PA, -PS, -PF, -AN, -FN, -LN, -A, -G}. Different sets of options and corresponding values may or may not be valid. If a set of options/values is invalid, gradebookdisplay should print "invalid," and exit with error code 255. Otherwise it will print out the requested data.

We next explain the various options and their purpose:

Command line arguments may appear in the following order: (1) A gradebook name must be specified first with -N (2) A key must be specified second with -K (3) An action must be specified third with exactly one of {-PA, -PS, -PF} (4) After the action option, other arguments from the set {-AN, -FN, -LN, -A, -G} may be specified in any order and if the same argument is provided multiple times, the last value is accepted. An incorrect order of arguments results in an error.

Return values and error conditions

If gradebookdisplay must exit due to an error condition, or if the argument combination is incomplete or contradictory, the program should print "invalid" to stdout and exit, returning a 255.

If the gradebook already exists, and the supplied key does not match the expected key, "invalid" should be printed to stdout and 255 returned. (When a gradebook file is first created, the generated key becomes the valid key for all future accesses to that gradebook.)

Some examples of potentially valid orderings and combinations of command-line options:

Some examples of conditions that would result in printing "invalid":