Gsub produces a file that you can use to submit the mark for your course. It is intended to meet the requirements of the Faculty of Arts and Science and of UTSC. Those requirements are simple — you just have to produce a CSV file containing student number–mark pairs, one to a line — so gsub may be helpful in other contexts too.
Usage
gsub [-?] [-m markname] [selection options] [file]
Details
Gsub accepts one option (apart from the selection options):
-m markname |
Treat the values of the mark named markname as the final marks to be submitted. |
Gsub reads the input grades file, or the standard input if there is no file argument, and writes to the standard output a sequence of lines. Each output line contains a student number and the value of that student's grade for the mark named markname.
If markname is missing (and the input comes from a named file and not the standard input), then gsub interrogates you for it.
Gsub accepts at most one file argument. It checks for duplicated student numbers, so your best approach, if you have more than one grades file for your course, is probably to combine all of them into one master file, rather than concatenating separate gsub outputs. This allows the program do its inadequate best at checking.
Naming the output file
Gsub doesn't care what you name the file where you
store its output — obviously, since it sends its output
to the standard output, and where it goes after that is up to you.
However, the file you send to the Faculty of Arts and Science
(or UTSC or wherever the "e-Marks" system is running)
must have a name ending in ".csv
".
Obviously, again, gsub can't check that for you.
Instead, e-Marks simply fails silently.
Blanks and zeroes
Marks of zero are not treated specially. Zeroes are sent to the output just like any other mark value. However, if a student's entry for markname is blank, then no output is produced. Even in this case, though, the student number is compared with previous numbers and recorded for comparison with future student numbers, and gsub reports duplicates as failures even if some or all of the corresponding marks are blank.
NGAs
Don't let this section worry you: it's really not hard to report NGAs.
The Faculty of Arts and Science requires you to report marks of NGA for students whose work requires further consideration before the mark can be accepted. For example, an NGA is appropriate in cases where you suspect cheating.
That rule may change in the future — it certainly has not been immutable in the past — but for now you do need to put "NGA" in the marks you report. The problem is that the grading programs, including gsub, reject "NGA" as an invalid mark. Thus, you can't put "NGA" in a student's marks and have gsub include it automatically in your grades submission file.
Here are a couple of reasonably sensible ways to work with NGAs. Both methods assume that you have a list of student numbers for the students who ought to be assigned NGAs. They're pretty easy to carry out by hand for a small class with not too many NGAs; for larger classes, or if you have more than a few NGAs to report, you could save yourself effort by writing a shell or Python script to modify the grades-submission file.
- Leave the calculated final grades in your grades file as if no NGAs were required, and let gsub produce the submission file as usual. Then, for each student number in the NGA list, replace the reported grade with "NGA".
- Remove the calculated final grades that ought to be NGAs from your grades file, so that gsub will omit those records from the submission file. Then for each student number in the NGA list, append a new record to the submission file with "NGA" as the grade.
Gsub writes full ten-digit student numbers, so your scripts probably need to read and write them too.
Does gsub guarantee that submitted marks are valid?
No.
Different faculties may accept or require different kinds of marks. For example, the Faculty of Arts and Science at the University of Toronto currently accepts only integers in the range 0 to 100, but other faculties in the same university have accepted or still do accept letter grades.
Gsub doesn't try to keep up to date with these rules. If the markname you specify belongs to a letter grade, you're going to report letter grades; if it is the name of a numeric grade with decimal fractions, you're reporting decimal fractions. I'm sure the Dean will let you know.
Read more about grade submission
See "Submitting your final grades" for more on the submission process. Remember that the Undergraduate Office is glad to help with the difficult cases of students who ought to be on your class list, or who ought not to be, or who are just mysterious.
Checking your marks, and counting the As and Bs
We used to have to report and sometimes explain the number of students in various letter-grade ranges, such as A and F. To do that, we used a program called markscan that could also check whether a submitted marks file was valid. The program is gone, and the the on-line submission site does at least some of the required checking. If you're worried about how many As and Bs and Fs you have, you might be thinking of the old rules. The Undergraduate Office can straighten you out.
You can count the grades with gstats or gpr, but to get correct counts, you must select just the right students from your grades file.