Index of /~rig/home/bin/courses
Parent Directory
This directory contains several shell scripts useful for course
administration and related academic purposes. Several of them are
based on the assumption that grades are maintained by the "sc"
spreadsheet program and that certain conventions are followed, but
there are also some more general scripts. First, I will give a
rundown of general scripts having nothing to do with sc. Then I will
describe an sc-based approach for grade maintenance, but some of the
commands described there or invoked as internals can also be useful
without sc; for example, "hist" can histogram any file of scores that
come one per line. Many of the commands described briefly in this
file contain a bit more documentation in the form of comments within
the actual script file.
First, this directory contains the following miscellaneous commands:
gpa: Computes GPA on a four point scale from a count of number of A,
B, C, D, and F grades.
gradavg: Compute numerical mean of letter grades,
e.g., "gradavg A B- D+ C F A".
A=4, B=3, C=2, D=1, F=0. +=1/3, -=-1/3.
isbncheck: Performs error detection on an ISBN number.
lastho: Shows handout numbers in sorted order and corresponding files,
assuming each handout number appears in an appropriate format in a
.tex or .txt file.
Now, before I get into the commands that are connected with sc, I need
to give you some pointers regarding the conventions I assume for the
.sc file. An example file that you can use as a template to start
from is found in "skel.sc".
The first line of the spreadsheet must contain right justified column
headings (rightstrings in sc). These headings must include "NAME",
"POST" and "EADDR"; case is significant. The "NAME" column is
straightforward, but a nonobvious rule is that names should always be
in upper and lowercase (or lowercase) so that they will not contain
any of the uppercase keywords mentioned below. The "POST" column may
contain the special strings "EMAIL" or "FAX" to indicate that grade
records will be sent to the student by email or fax, respectively. Or
it can contain an arbitrary string selected by the student to be used
as a secret code for posting grades in a public place. The entry may
also be "NOBODY" to supress posting. The "EADDR" column should
contain an electronic address for any student with "EMAIL" or "FAX" in
the "POST" column. If the "POST" column contains "EMAIL" or "FAX",
but you don't actually have an electronic address, you should put
"NOBODY" in this column before invoking the "postgrades" command (or
students might recieve another student's grade record). ("NOBODY" is
assumed to be an email address you can send to without consequence, so
that entering this string should cause no problem for the "mailaddrs"
command.) The "CLS" column is an optional one that may contain a
single character "class" indicator (e.g., "G" for graduate student,
"S" for senior, and "N" for NTU student). The "NUMBER" column is a
personal identification number used by the "wwwac" command to set
passwords for website access. Each column should have its format
adjusted so that it is wide enough to hold all the contents; columns
to contain scores should have formats that will round all numbers to
integers.
Any nonblank lines besides the header line and the student lines
should contain one of the strings "POSSIBLE", "MAX", "MIN", "AVG", or
"STDDEV". You need not include such an elaborate statistics section
as in skel.sc, but the file gives an example of the sort of thing you
can do.
Don't use any of the uppercase strings mentioned above within the
spreadsheet except as described above.
Now the following additional commands are available.
sc2txt: Creates a .txt file from a .sc file; also does a save of the
.sc file, which sorts the lines into a canonical order.
The .txt file is a straight text tabular representation of the
spreadsheet contents; use enscript with an appropriate font to
print it. You can also use the "grades2ps" command to choose
a sufficiently small font to print key information on one page
using my "ps1" command from
http://www.cs.luc.edu/~rig/home/bin/ps1. (To make it print in
landscape mode, just create a fiel grades.orient containing
the word landscape.)
courseeaddrs: Inspects two argument files, the first a .txt file as produced
by sc2txt and the second giving a PIN and email address for a
grader, and creates aliases in foo.mailrc for the grader and
for the class. Also creates on foo.faxdests a list of people
with fax numbers in a format suitable for the faxlist command
(on my bin/tex directory).
gradehist: Create a histogram of column of scores labeled $2 in file $1.
Each student's score is shown with the corresponding symbol for
that student under CLS if the CLS column is present.
letsinsc: Puts letter grades into a chosen column of the spreadsheet based
on numeric grades in another column. For safety, the old version
of the spreadsheet is "nondestructively deleted" using my
bin/versctrl/del command. If you want to live more dangerously
and avoid messing with my versctrl stuff, comment out the
two indicated lines near the end of the file.
postgrades: Inspects $1.txt and
(1) Makes a list of student grade records (on $1.post)
to be posted for all those students that have a secret
code in the "POST" column.
(2) Makes a file for each student who has "EMAIL" in his
"POST" column and doesn't have "NOBODY" under "EADDR".
Each file name of the form eaddr.egr, where "eaddr" is
the students email address. The file contains a message
taken from pgmsg.txt and then the student's complete
record from the spreadsheet (excepting the POST and CLS
column entries).
(3) Does the same thing as in (2) but for "FAX" rather than
"EMAIL" entries under "POST". Here, the file names
are of the form info@telnum.fgr, where "info" is the
name and perhaps location information (with spaces
converted to underscores), and "telnum" is the fax
telephone number.
emailgrades: Email out each of the .egr grade record files to the
appropriate email address.
faxgrades: Fax out each of the .fgr grade record files to the appropriate
fax number with an appropriate cover page. Uses the commands
txt2dvi and faxlist (and faxlist uses flinternal) on my bin/tex.
Assumes you have a fax server set up to handle "sendfax" commands.
The following commands are invoked by commands described above:
hist: Called by gradehist to produce a histogram
checkhist: Called by gradehist to count the number of scores in a histogram
stripgradestats: Called by gradehist and postgrades to remove the rows
containing summary statistics from grades.txt.
excol: Called by mailaddrs, gradehist, letsinsc, and postgrades to
extract columns from grades.txt
findcol: Called by excol.
exchars: Called by excol.
pginternal: Called by postgrades.
emailrecord: Called by emailgrades.
faxrecord: Called by faxgrades.