Assignment ID (AID) Strings
for
FERPA and/or Anonymous Grading
Copyright 2020 Leon van Dommelen. This text and software
is made available under the GNU Public License version 3.
Contents
This web page discusses two programs that allow you to assign a unique
"Assignment ID" (AID) to each student in a class.
Program alpaid creates 3 character alphanumeric AID strings,
while program numaid creates 4 digit numerical AID strings
(NAID strings). The main focus is on adding these AID strings to
Canvas, or Blackboard, student records, but they can be added to any
CSV file, or even to the start or end of the lines in a plain text
file. Maximum class size is 232 for alpaid and 323
for numaid.
One motivation for these programs is the federal FERPA law. This law
requires educational institutions to prevent disclosure of personally
identifiable educational records. Even leaving homeworks with student
names and grades on them in a publicly accessible place, like in a box
outside your door, or forgetting the uncollected homeworks in your
classroom, violates federal law. The solution discussed here is to
ask students to put their private AID instead of their names on their
homeworks. Then even if the assignments are found, the students with
the grades are no longer personally identifiable and there is no
violation of the law.
Another motivation is the grading itself. People often have biases
even without realizing it. If you want to make sure you are really
grading without bias, you can again have students put their AID, like
a 4 digit one, instead of their names on their assignments. Assuming
you do not remember masses of random four digit numbers, this will
make grading anonymous. (Except for those who work real hard on being
remembered. You may even want to periodically change the AID strings
to combat this, if it is an issue for you.) Poorvu at Yale has a
write up that I
think is well balanced.
Program alpaid creates random alphanumeric AID strings
like
BVR GZJ AOB H6G DVS PLH GLY DCJ S4H B8E ...
while program numaid creates numeric AID (or NAID) numbers
like
7581 4870 6731 8256 4812 7190 9468 3570 4157 9820 ...
These may optionally be preceded by a "class ID", like in
flmBVR flmGZJ flmAOB flmH6G flmDVS flmPLH flmGLY ...
for a course like Fluid Mechanics using alphanumeric AID strings,
or
27581 24870 26731 28256 24812 27190 29468 23570 ...
for a class like EML 3002L (hence 2) using numeric AID strings. The
class ID is intended to keep the AID strings of different classes
apart. A selectable "class distinction digit" keeps the AID strings
apart even if you or the students omit the class ID.
Alphanumeric AID strings are obviously more memorable, good for
students actually remembering their AID, but probably less great for
anonymous grading. Then again, AID strings might seem less like
"I am just a number in this class" to students.
If you use Canvas LMS for grade entry, the alphanumeric AID strings
suffer from the fact that stupid Canvas does not allow you to upload
any nonnumeric strings from a CSV file. So, using alphanumeric AID
strings, you may find that you want to do some manual typing-in of the
alphanumeric strings when you are initially setting up the class.
(This is not strictly needed, but certainly neater.) Do note that
even using numeric AID numbers, you may want to copy the AID numbers
manually into the Canvas "Notes" column for more streamlined grade
entry later.
Based on available documentation, I think the Canvas LMS issues above
are not a real issue for Blackboard LMS. But without having a working
copy of Blackboard that I can experiment with, I cannot say for sure.
You might think "What's the big deal? Just find a list of random
numbers somewhere, or use a random number generator, and assign them
to the students as Numerical Assignment ID (NAID) values. But there
are some considerations;
-
Obviously the numbers have to be unique. For, say, completely random
chosen four digit NAID numbers (not starting with 0) and a class of
100 students, there is a 42% chance that two students end up with the
same NAID. That would be 14% for three character, case-insensitive,
alphanumeric AID strings starting with a letter. However, if either
one happens, it will be readily recognized and fixed the first time
the (N)AID values are sorted for grade entry. And for a class size of
30 students, the chance of duplicate NAID numbers is only 5%, or 1%
for AID strings. Fortunately, both provided programs numaid
and alpaid generate unique (N)AID strings, even while random,
avoiding the problem completely.
-
Obviously, you want AID values short enough that the students can
remember them and enter them correctly. You do not want to deal with
a continuous stream of assignments with misremembered and mistaken
(N)AID values that you need to track down to the correct students.
Especially when you give the credit repeatedly to the wrong student
and much later you have to figure out what happened and how to fix it.
-
If a student mistypes a single AID character or a single NAID digit,
or the grader misreads one, you would not want the consequence from
that single mistake to be that a wrong student gets the credit. Both
AID strings and NAID numbers contain a check character that prevents
this. Any single wrong character always produces an invalid (N)AID.
-
It is not uncommon for a particular digit or character to be
misunderstood, especially if handwritten. For example, a 4 may be
read as a 9 or vice versa, a 1 or 2 as a 7, etcetera. If such a
problematic character occurs twice, the check sum might not
necessarily catch the error. So, to avoid such problems, NAID numbers
which contain the same digit more than once are disabled, as are AID
strings which contain the same character more than once.
In addition, AID characters are subdivided into two sets, one set for
the first and last character, and the other set for the middle
character. The sets are chosen so that characters that are commonly
confused are generally in different sets. The data on which
characters are commonly confused was taken from
the ISMP
(Institute for Safe Medication Practices). Those doctor prescriptions
contain some miserable handwriting, enough to kill people. AID
strings also disallow the digits 0, 1, 2, 7, and 9 because of
similarity with O, I/l, Z, Z/F/T, and 4/g/Q/q respectively. Digit 5,
similar to S/Y, has been kept, as it is in a different set than S and
Y.
-
It is also not uncommon for characters to get transposed, like 87
instead of 78, in writing or especially typing by the student, or in
reading by the grader. To avoid problems, AID strings where swapping
characters produces a valid other AID are disabled. This and the
previous item reduces the number of available AID strings from 256
(the check digit is computed, not arbitrary) to 232. Similarly NAID
numbers in which swapping any two digits (including reversing three
consecutive digits) produces a valid other NAID are disabled. This
and the previous item reduces the number of available NAID numbers
from 900 to about 300. (Maximum is 323, for identification digits 2,
4, 6, and 8.)
-
What if the fingers of the student are shifted a unit with respect to
the keyboard when typing in more than one of the digits of the NAID?
Up to 3 consecutive digits can be shifted that way without creating a
valid NAID; shifting all 4 by the same amount will produce a valid
one.
-
What if another class also uses AID or NAID strings, and a student
uses the AID or NAID from that class in yours? Or, what if in the
middle of the semester you need to create a new set of AID or NAID
strings, and some students use the old one? To combat that, as noted
in the introduction, the programs allow you to specify a "distinction
digit" when creating the (N)AID strings. As long as the other class,
or the new set of strings, uses a different distinction digit, its
(N)AID strings are always going to be invalid in your current set.
In addition the two programs allow you to specify a "Class ID" that is
prefixed to the (N)AID, so that the (N)AID strings of different
classes are also visibly distinct.
-
What if more than one of the above mistakes occurs in a single AID or
NAID? Or if a completely random AID or NAID is entered? One might
reasonably argue that making two different errors in a three character
or four digit string is essentially the same as writing a random
string. And for a class size of 90 students, a completely random
string of four digits not starting with 0 has only a 1 in 100 chance
of being a valid NAID, and for a smaller class size correspondingly
less. Similarly, for a class size of 90 students a completely random
string of three case-insensitive alphanumeric characters starting with
a letter has only a 1 in 400 chance of being a valid AID, and less for
a smaller class size.
-
How about Big Data cross-correlating different data on students,
presumably both legally and not so legally obtained, to get detailed
data on the students? If that sounds far-fetched, think of the amount
of money an average student is expected to earn and manage in a
lifetime. It just needs long-term vision. If, say, the last four
digits of a student ID would be used as an AID, a single crack
allowing the four digits to be identified with a specific student
could open a wide range of information on that student. And in any
case, anyone with access to the student ID data, which is a lot of
people, could identify which grade corresponds to which student.
However, the numaid and alpaid programs make the
(N)AID strings untraceable; they seed the random number generator with
precise time of the day and process ID of creation. That information
cannot be reconstructed in any conceivable way unless you get hold of
the actual log files of that particular (N)AID generation. Even if
you did, that info would not help you in any other class or anywhere
else.
The following steps are always needed to use the programs:
-
Decide whether you prefer 3 character alphanumeric AID strings
(program alpaid) or 4 digit NAID numbers
(program numaid). See the first two sections for
considerations.
-
If other classes that your students might be taking will also be using
AID strings, respectively NAID numbers, select a "class distinction
digit," like the last digit of your class number, or any other digit
that you can reasonably assume is unique to your class. Or better,
coordinate with the instructors of the other classes on different
distinction numbers. Also, if in the middle of the semester you
decide to create a new set of (N)AID strings from scratch, make sure
to use a different distinction digit for this set. (Or see the
relevant one of the final two sections on a better approach if you
still have enough unused (N)AID strings left.)
-
On your work computer (you are not supposed to have student data on
your personal computer), download the zip file for your operating
system:
Unzip the file in a suitable location and rename the created folder
"makeaid" into something along the lines of "CLASSNUMBER_SEMESTER".
(You may want to edit "email.txt" to set your university e-mail
domain, but this is not really needed.)
More details for MS Windows users: In Edge or Internet
Explorer, click or right click
the Microsoft Windows zip file above
and select "Save" or "Save As", depending on where you want to save
it. Save it. Then click the offered "Open Folder" button, if any.
Otherwise browse down to the zip file using Windows Explorer/File
manager.
Now select the downloaded zip file. In Windows 10, this created an
"Extract" button. Clicking this produced an "Extract All" button
which will extract the folder. (You may want to get rid of the final
\makeaid_MS in the offered folder name.) (In Windows XP I had to
right-click the zip file to get an "Extract All..." option.) Rename
the extracted folder along the lines CLASSNUMBER_SEMESTER, by either
right-clicking it or using the File menu. Then double-click it to see
what is inside.
If at all possible, stop MS Windows from stupidly hiding the final
part of file names from you. To do so, in Windows 10 I had to click
the "File" button, then "Change folder and search options", select the
"View" tab, then deselect (i.e. blank) "Hide extensions for known file
types". (In Windows XP, I had to get to the "View" tab from the
"Tools" menu "Folder Options" item.) If you do it right, if you look
inside the CLASSNUMBER_SEMESTER folder, you should see a file listed
as "email.txt". If it just says "email", extensions are still hidden.
Windows 10 does not like programs that you get from the web and you
need to do some unlocking. In particular, right-click the
run_alpaid.bat file and select "Properties". Then in the "General"
tab, select the "Unblock" item, so that Windows 10 stops refusing to
run it. The same for file run_numaid.bat, then the same for files
alpaid.exe and numaid.exe which are in the "bin" subfolder. This made
the programs runable on my completely standard Windows 10 system.
(None of this was needed on my Windows XP machine.) You might have a
third party virus checker that throws up its own roadblocks; I cannot
do anything about that, but there should be some way to tell it not to
do so described in its docs.
The next steps depend on what exactly you want to add the (N)AID
strings to. Read next whichever of the following subsections
describes best what you want to do.
After doing what is described in the "How to
start" subsection, now do the following:
-
First get the CSV file to add the (N)AID strings to from Canvas: In
Canvas, go into the class, then into "Grades". If the "Notes" column
is not visible, make it so from the "View" drop-down box. Then from
the "Actions" drop down box, select "Export" and save the generated
file in your CLASSNUMBER_SEMESTER folder as "???aid.csv", where "???"
is "alp" for alphanumeric AID strings or "num" for numeric NAID
strings. If you look at the file in File Manager/Windows Explorer, it
should be in the same folder as file email.txt.
Microsoft Windows users: If you managed to turn off hiding of
extensions, the file should be listed as "???aid.csv". If you did not
manage to turn it off, the file will almost certainly be listed as a
bare "???aid". (In Windows 10, you can see the true name of a file by
right-clicking the file, selecting "Properties", then the "Details"
tab. You should see "???aid.csv" for the correct file. This does not
work in Windows XP, but here there is a trick: in Properties, there
should be an item: "Opens with:" and a corresponding "Change" button.
If you press the button, Microsoft will actually tell you the true
file name. After you know it, press the "Cancel" button, and again.)
If the decimal mark in your country is comma instead of point
(as is true in many countries in Africa, Continental Europe and South
America): Your .csv file is quite likely not a CSV (comma separated
values) file at all but really an SSV (semicolon separated values)
one. If so, right-click ???aid.csv and rename it ???aid_ssv.csv (or
save it with that name from the beginning). The _ssv part in the name
notifies the programs that this is really an SSV file, not a CSV one.
(If you are in doubt whether or not it is an SSV file, open ???aid.csv
with Notepad in Windows or with gedit or nano in Linux and have a look
whether commas or semicolons separate the fields in a row. Do not
change the file in doing so. Alternatively, just try to process as
is. If you try to process an SSV file as ???aid.csv, or an CSV file
as ???aid_ssv.csv, the programs will fail, or at the very least mess
up the columns, like put everything in a single column. If this
happens, delete the ???aid.lcs file, rename the .csv file, and try
again.)
-
Create a file "new_???aid....csv" that has the (N)AID strings added,
as follows:
- Microsoft Windows users: Double-click the run_alpaid.bat
or run_numaid.bat file, for AID or NAID strings respectively.
- Linux/Unix users: Try right-clicking the folder and
selecting "Open terminal here". If that does not work, open a
terminal some other way and cd to the folder. Then issue the command
"bin/alpaid" or "bin/numaid" for AID or NAID strings respectively.
Either way, you will be asked for your "class distinction digit", as
described in "How to start". Enter 0 if you
do not need one. Then you will be asked for an optional class ID, to
be prepended to the (N)AID strings. For NAID numbers, the class
distinction digit is a good choice. (Warning: do not try to append a
decimal point behind the distinction digit. While the program allows
it, and it looks better, the problem is that Canvas would round the
NAID number behind the decimal point to two digits.) For AID strings,
a lower case class ID like flm for Fluid Mechanics or m&m for
Mechanics and Materials would be a good choice. If you do not want to
prepend a class ID, just hit Enter.
-
The program should now create a new CSV file, "new_alpaid[_ssv].csv"
or "new_numaid[_ssv].csv", that has a column "AIDsort" of AID "sort
numbers", respectively a column "NAID" of NAID numbers added behind
the "Notes" or "Section" column. The final (unchanged) columns have
been deleted to speed up uploading the file to Canvas. You may want
to look at file new_???aid[_ssv].csv with an editor or Excel or Open
Office, but do not let those programs make changes to the file
(do not save). Excel and Open Office will mess up long
student ID numbers. While programs like Canvas and Blackboard expect
that, why do it if there is no need? Only make changes with Excel or
Open Office if there is a real need.
You may also want to look at the created ???aid.log and ???aid.???.txt
files that may be useful to you for various reasons.
Linux/Unix Users: If you would rather have the various files
in Microsoft format for some reason, run the command "bin/microsoft".
(Requires tcsh installed.) If the computer you are using has a
working Mail Transfer Agent, and you had the correct e-mail domain in
file email.txt, you may also be able to e-mail the students their
(N)AID using the command "bin/mailids 'MY_CLASS_NAME'" (without the
double quotes). (This uses the data in file ???aid.nam.txt.)
-
If something goes wrong and you must run the program again:
Rather than creating a new CLASSNUMBER_SEMESTER folder, you can more
simply delete the files named ???aid.lcs and ???aid.cid. This will
cause the programs to run again from scratch.
-
Upload the new_???aid[_ssv].csv file into Canvas. To do so, in
Canvas, go back into the course and into "Grades". From the "Actions"
drop down box, this time select "Import". Browse down to the newly
created new_???aid.csv file, open it and upload it. You can curse
when Canvas refuses to upload the "Notes" column, but that did not
help me. For the AIDsort or NAID column prompt, from the drop down
select "New Assignment" and enter 0 in the "Points Possible" box.
Select "Save Changes". Canvas will now put in the new grades in its
own slow way. You may need to leave and reenter "Grades" a few times
before all the numbers are there. Canvas warns you not to do anything
nontrivial before all numbers are there.
-
Click on AIDsort or NAID in the header of the added column, then
select "Edit", then "Do not count toward final grade", and "Save". Or
else you may see how buggy Canvas really is.
-
Note that you can sort by AIDsort or NAID number by clicking the dots
in the AIDsort or NAID header cell and selecting "Sort by > Grade
low to high". This simplifies grade entry by AID or NAID; you do not
have to search through the entire list for each AID or NAID.
-
Required additional set up when using AID strings: The
students must know how to find their actual AID string from their
AIDsort number. In Canvas, exit "Grades" and enter "Announcements".
Press the "+Announcement" button; enter a title like "Please find and
use your AID string", and attach the file alpaid.srt.txt in the
CLASSNUMBER_SEMESTER folder to the message. (If for some reason you
prefer a web page version of alpaid.srt.txt, it is in alpaid.htm.) In
the body of the message, tell the students to first find their AIDsort
number in the grades area, then to find the AID corresponding to that
sort number in the file attached to the announcement, and put that AID
instead of their name on all their assignments and exams.
(It is probably simpler for the students if you put file
alpaid.srt.txt in the body of the message itself instead of just as an
attachment. To do so, open alpaid.srt.txt in the CLASSNUMBER_SEMESTER
folder with a text editor like Notepad in Windows, or gedit or nano in
Linux, and copy all its contents, maybe using the Edit menu or Ctrl+a
and Ctrl+c. Then in the Canvas announcement being created, first in
the drop-down box that probably says "Paragraph", select
"Preformatted" instead, to avoid the table being messed up. Then
paste the copied text in the preformatted area using the browser's
Edit menu or Ctrl+v.)
-
Recommended additional setup when using NAID numbers: I think
it is neatest for grade entry purposes if in Canvas you copy the NAID
numbers from the NAID column into the "Notes" column. The reason is
that the Notes column, like the "Student" column, remains visible when
your are scrolling sideways through a large number of assignment
columns to the particular assignment column you are entering grades
in.
(Using the Notes column is not really needed, as you can grab the
header cell of the NAID column with the mouse and drag it sideways to
the grade column you are entering. But doing this for countless
assignments in a semester might become much more annoying than just
creating the Notes column once during class setup.)
The quickest way to enter the NAID numbers in the Notes column is:
- Make sure the Notes column is visible; use the View drop down box
if it is not. Grap the top cell of the Notes column with the mouse
and drag it to the left of the Student column. Put the NAID column at
the other, right, side of the Student column, if it is not there yet.
Using the menu inside the NAID column header cell, sort the NAID
numbers from low to high.
- Click in the Notes cell of the first student and type in
the corresponding NAID number from the NAID column.
- Trick: Use Ctrl+Enter to go most quickly to the next
student. Using this trick, it took me 2.5 minutes to do 17 students.
While unfortunately, Canvas does not allow you to upload the Notes
column, if you re-Import new_numaid.csv, Canvas will show you
where the Notes column is different from the one in new_numaid.csv.
Use that to check for typos.
Note that even with the NAID numbers in the Notes column, you cannot
delete the NAID column. You need it during grade entry to sort the
NAID numbers. Also, the students cannot see the Notes column.
-
Recommended additional setup when using AID strings: First
follow the same additional setup as for NAID numbers above, except in
the Notes column, type both the AID and the AID sort number, separated
by a space, and the sort number padded with leading zeros to 3 digits.
For the AID strings, you will want to have file alpaid.aid.txt from
the CLASSNUMBER_SEMESTER folder open right next to your browser.
Having the AID sort number in the Notes column is handy in case a
student enters the AID sort number instead of the AID. Correct them;
the sort number is not at all safe from typos and misreading.
Also: To free the students from the need to look up their
actual AID in the Notification described earlier, you can directly
attach the AID as a comment in the AIDsort column. To do so, click in
each student cell of the AIDsort column. Click the small arrow that
appears, enter the AID in the "Leave a comment" box, and click
"Submit". You will again want to have file alpaid.aid.txt from the
CLASSNUMBER_SEMESTER folder open right next to your browser. This
process is somewhat of a pain. It took me 2 minutes for 8 students.
But even for a big class, it is much faster if you let your TA do it.
-
If more students add the course: You can repeat the process
by downloading an updated ???aid....csv file from Canvas to the
CLASSNUMBER_SEMESTER folder, running the program again, etcetera.
Alternatively, if it is just a few additional students, you can enter
the (N)AID strings manually. The first few unused (N)AID strings can
be found printed out near the end of file ???aid.log.
Note: if you want to rerun the program after adding some (N)AID
strings manually, you will first have to update the count of used
(N)AID strings; this is the second number in file ???aid.lcs.
(Extension lcs stands for Limit, Count in use, and Seed.)
Since my college is no longer using Blackboard, I cannot verify
what is the best way to use the created N(AID) strings inside
Blackboard. But at least NAID numbers should upload fine. See
however the comments at the end of this section on potential issues
for AID strings. Any further info from Blackboard users would be
appreciated.
After doing what is described in the "How to
start" subsection, now do the following:
-
First get the "XLS" file (really a tab-separated UTF-16LE text file
with every field double-quoted rather than an XLS file) to add the
(N)AID strings to from Blackboard (for more on these steps see
the Blackboard
Docs): In Blackboard, go into the class, then into "Grade Center"
and select the "Full Grade Center". Click the "Work Offline" drop
down button and select "Download". Then select "User Info Only", and
a "Tab" delimiter. If "Hidden Info" appears (it should not), use the
default. Then select (Save on) "My Computer" and click "Submit".
Save the generated file in your CLASSNUMBER_SEMESTER folder as
"???aid.xls", where "???" is "alp" for alphanumeric AID strings or
"num" for numeric NAID strings. If you look at the file in File
Manager/Windows Explorer, it should be in the same folder as file
email.txt.
Microsoft Windows users: If you managed to turn off hiding of
extensions, the file should be listed as "???aid.xls". If you did not
manage to turn it off, the file will almost certainly be listed as a
bare "???aid". (In Windows 10, you can see the true name of a file by
right-clicking the file, selecting "Properties", then the "Details"
tab. You should see "???aid.xls" for the correct file. This does not
work in Windows XP, but here there is a trick: in Properties, there
should be an item: "Opens with:" and a corresponding "Change" button.
If you press the button, Microsoft will actually tell you the true
file name. After you know it, press the "Cancel" button, and again.)
-
Create a file "new_???aid.xls" that has the (N)AID strings added, as
follows:
- Microsoft Windows users: Double-click the run_alpaid.bat
or run_numaid.bat file, for AID or NAID strings respectively.
- Linux/Unix users: Try right-clicking the folder and
selecting "Open terminal here". If that does not work, open a
terminal some other way and cd to the folder. Then issue the command
"bin/alpaid" or "bin/numaid" for AID or NAID strings respectively.
Either way, you will be asked for your "class distinction digit", as
described in "How to start". Enter 0 if you
do not need one. Then you will be asked for an optional class ID, to
be prepended to the (N)AID strings. For NAID numbers, the class
distinction digit is a good choice. For AID strings, a lower case
class ID like flm for Fluid Mechanics or m&m for Mechanics and
Materials would be a good choice. If you do not want to prepend a
class ID, just hit Enter.
-
The program will now create a new XLS file, "new_alpaid.xls" or
"new_numaid.csv", that has a column "AID" of AID strings, respectively
a column "NAID" of NAID numbers added at the end (or behind the sixth
column if you downloaded the full grade center instead of user info
only). You may want to look at file new_???aid.xls with an UTF-16LE
capable editor or Excel or Open Office, but do not let those programs
make changes to the file (do not save). Excel and Open Office will
mess up long student ID numbers. While programs like Canvas and
Blackboard expect that, why do it if there is no need? Only make
changes with Excel or Open Office if there is a real need.
You may also want to look at the created ???aid.log and ???aid.???.txt
files that may be useful to you for various reasons.
Linux/Unix Users: If you would rather have the various files
in Microsoft format for some reason, run the command "bin/microsoft".
(Requires tcsh installed.) If the computer you are using has a
working Mail Transfer Agent, and you had the correct e-mail domain in
file email.txt, you can also e-mail the students their (N)AID using
the command "bin/mailids 'MY_CLASS_NAME'" (without the double quotes).
-
If something goes wrong and you must run the program again:
Rather than creating a new CLASSNUMBER_SEMESTER folder, you can more
simply delete the files named ???aid.lcs and ???aid.cid. This will
cause the programs to run again from scratch.
-
(UNVERIFIED) Upload the "new_???aid.xls" file into Blackboard. To do
so, in Blackboard, go back into the course and into Grades. From the
"Work Offline" drop down box, this time select "Upload". Browse down
to the newly created new_???aid.csv file in CLASSNUMBER_SEMESTER, open
it and upload it. For "Delimiter" select "Tab". Click "Submit".
Confirm the upload.
-
If more students add the course: You can repeat the process
by downloading an updated ???aid.xls file from Blackboard to the
CLASSNUMBER_SEMESTER folder, this time with the (N)AID column, running
the program again, etcetera. Alternatively, if it is just a few
additional students, you can enter the (N)AID strings manually. The
first few unused (N)AID strings can be found printed out near the end
of file ???aid.log.
Note: if you want to rerun the program after adding some (N)AID
strings manually, you will first have to update the count of used
(N)AID strings; this is the second number in file ???aid.lcs.
(Extension lcs stands for Limit, Count in use, and Seed.)
Unfortunately, as noted, I do not have access to a working
blackboard system as an instructor, so I cannot verify that the above
works as it should. Some considerations:
After doing what is described in the "How to
start" subsection, now do the following:
-
From your learning management software (LMS), get an appropriate csv
file to add the (N)AID strings to. Save the generated file in your
CLASSNUMBER_SEMESTER folder as "???aid.csv", where "???" is "alp" for
alphanumeric AID strings or "num" for numeric NAID strings. If you
look at the file in File Manager/Windows Explorer, it should be in the
same folder as file email.txt.
Microsoft Windows users: If you managed to turn off hiding of
extensions, the file should be listed as "???aid.csv". If you did not
manage to turn it off, the file will almost certainly be listed as a
bare "???aid". (In Windows 10, you can see the true name of a file by
right-clicking the file, selecting "Properties", then the "Details"
tab. You should see "???aid.csv" for the correct file. This does not
work in Windows XP, but here there is a trick: in Properties, there
should be an item: "Opens with:" and a corresponding "Change" button.
If you press the button, Microsoft will actually tell you the true
file name. After you know it, press the "Cancel" button, and again.)
If the decimal mark in your country is comma instead of point
(as is true in many countries in Africa, Continental Europe and South
America): Your .csv file is quite likely not a CSV (comma separated
values) file at all but really an SSV (semicolon separated values)
one. If so, right-click ???aid.csv and rename it ???aid_ssv.csv (or save it
with that name from the beginning). The _ssv part in the name
notifies the programs that this is really an SSV file, not a CSV one.
(If you are in doubt whether or not it is an SSV file, open ???aid.csv
with Notepad in Windows or with gedit or nano in Linux and have a look
whether commas or semicolons separate the fields in a row. Do not
change the file in doing so. Alternatively, just try to process as
is. If you try to process an SSV file as ???aid.csv, or an CSV file
as ???aid_ssv.csv, the programs will fail, or at the very least mess
up the columns, like put everything in a single column. If this
happens, delete the ???aid.lcs file, rename the .csv file, and try
again.)
Blackboard users: When I tried to download a grades file from
Blackboard, selecting a Tab delimiter/separator, I got a .xls file
instead of a .csv file. However, looking inside it, it was not an XLS
file at all! It was a UTF-16LE encoded TSV (Tab Separated Values)
file, completely different! Just leave the incorrect .xls extension
as is, do not change to _tsv.csv. The programs will assume based on
the .xls extension that it is Tab-separated. (The programs are
not capable of processing a true .xls file, so there is no
conflict.)
-
Load the file in Excel or Open Office and have a good look at it (but
do not modify it, do not Save it).
- See how many "header lines" there are; lines that are not student
records. Typically there is at least one header line with the names
of the columns in it. But, for example, Canvas has a second line that
is not a student record too. Blackboard has only one header line.
- Decide what the column number of the new column of (N)AID strings
should be. Column number 1 means that the new column will be the
first column, column number 2 the second column, etcetera. Column
number 0 will add the (N)AID column as the final column. For example,
a file downloaded from Blackboard might have a single header line
starting with the 6 columns "Last Name", "First Name" "Username",
"Student ID", "Last Access", and "Availability", followed by grade
columns. In that case making the (N)AID column column 7 would be
appropriate.
-
Create a file new_???aid.... that has the (N)AID strings added:
- Microsoft Windows users: Right-click file run_???aid
and open it with NotePad. A bit down in the file you will see
a line
bin\???aid.exe "-" "-" "-" "-" "-" "-" "-"
The quoted hyphens are the default parameters. You need to change the
third one into the number of the aid column, and the fourth one into
the number of header lines, followed by the name of the column. For
example, to make the (N)AID column column 7, and there is 1 header
line and the name of the (N)AID column should be (N)AID, change the
line to
bin\???aid.exe "-" "-" "7" "1(N)AID*" "-" "-" "-"
(The star is to accommodate programs like Blackboard and Canvas that
put numbers behind the column headers.) Save the file and exit
Notepad, then double-click run_???aid.bat to run the program.
- Linux/Unix users: Try right-clicking the folder and
selecting "Open terminal here". If that does not work, open a
terminal some other way and cd to the folder. Then, assuming you want
to add a column of NAID numbers as column 7, and that there is 1
header line, and that you want to call the column NAID, issue the
command
bin\numaid.exe - - 7 "1NAID*"
(The star is to accommodate programs like Blackboard and Canvas that
put numbers behind the column headers.)
Either way, you will be asked for your "class distinction digit", as
described in "How to start". Enter 0 if you
do not need one. Then you will be asked for an optional class ID, to
be prepended to the (N)AID strings. For NAID numbers, the class
distinction digit is a good choice. For AID strings, a lower case
class ID like flm for Fluid Mechanics or m&m for Mechanics and
Materials would be a good choice. If you do not want to prepend a
class ID, just hit Enter.
-
The program should now create a new CSV/XLS file, "new_alpaid..." or
"new_numaid...", that has the column of (N)AID strings added.
You may also want to look at the created ???aid.log and ???aid.???.txt
files that may be useful to you for various reasons.
Linux/Unix Users: If you would rather have the various files
in Microsoft format for some reason, run the command "bin/microsoft".
(Requires tcsh installed.)
-
If something goes wrong and you must run the program again:
Rather than creating a new CLASSNUMBER_SEMESTER folder, you can more
simply delete the files named ???aid.lcs and ???aid.cid. This will
cause the programs to run again from scratch.
-
If adding alphanumeric AID strings fails: A LMS system like
Canvas does not allow you to upload non-numeric data, which includes
alphanumeric AID strings. In that case, you can upload AID "sort
numbers", used to sort AID strings numerically, by changing the name
of the AID column from AID to AIDsort (case-sensitive). But now you
must of course provide the students with a separate way to find their
actual AID from their AID sort number. The CLASSNUMBER_SEMESTER
folder will have an aid.srt.txt text file that you can put in an
announcement or e-mail, an alpaid.htm web page that you can post, or
there may be an other way to do it. See the Canvas subsection for
ideas.
-
If more students add the course: You can repeat the process
by downloading an updated ???aid.csv file from your LMS to the
CLASSNUMBER_SEMESTER folder, running the program again, etcetera.
Alternatively, if it is just a few additional students, you can enter
the (N)AID strings manually. The first few unused (N)AID strings can
be found printed out near the end of file ???aid.log.
Note: if you want to rerun the program after adding some (N)AID
strings manually, you will first have to update the count of used
(N)AID strings; this is the second-last number in file ???aid.lcs.
(Extension lcs stands for Limit (i.e. the number of available (N)AID
strings), (already used) Count , and Seed.)
After doing what is described in the "How to
start" subsection, now do the following:
-
Select whatever file you want to add (N)AID strings to. This should
be a plain text file containing one line for each student. UTF-16
encoding or a UTF-8 BOM is OK. Copy the file into the
CLASSNUMBER_SEMESTER folder as "???aid.txt", where "???" is "alp" for
alphanumeric AID strings or "num" for numeric NAID strings. If you
look at the file in File Manager/Windows Explorer, it should be in the
same folder as file email.txt.
Microsoft Windows users: If you managed to turn off hiding of
extensions, the file should be listed as "???aid.txt". If you did not
manage to turn it off, the file will be listed as a bare "???aid".
(In Windows 10, you can see the true name of a file by right-clicking
the file, selecting "Properties", then the "Details" tab. You should
see "???aid.txt" for the correct file. This does not work in Windows
XP, but here there is a trick: in Properties, there should be an item:
"Opens with:" and a corresponding "Change" button. If you press the
button, Microsoft will actually tell you the true file name. After
you know it, press the "Cancel" button, and again.)
-
Create a file new_???aid.txt that has the (N)AID strings added:
- Microsoft Windows users: Double-click the run_alpaid.bat
or run_numaid.bat file, for AID or NAID strings respectively.
- Linux/Unix users: Try right-clicking the folder and
selecting "Open terminal here". If that does not work, open a
terminal some other way and cd to the folder. Then issue the command
"bin/alpaid" or "bin/numaid" for AID or NAID strings respectively.
Either way, you will be asked for your "class distinction digit", as
described in "How to start". Enter 0 if you
do not need one. Then you will be asked for an optional class ID, to
be prepended to the (N)AID strings. For NAID numbers, the class
distinction digit, maybe followed by a decimal mark, is a good choice.
For AID strings, a lower case class ID like flm for Fluid Mechanics or
m&m for Mechanics and Materials would be a good choice. If you do
not want to prepend a class ID, just hit Enter.
-
The program should now create a new text file, "new_alpaid.txt" or
"new_numaid.txt", that has a (N)AID string followed by ": " added
at the start of each line.
You may also want to look at the created ???aid.log and ???aid.???.txt
files that may be useful to you for various reasons.
Linux/Unix Users: If you would rather have the various files
in Microsoft format for some reason, run the command "bin/microsoft".
(Requires tcsh installed.)
-
If something goes wrong and you must run the program again:
Rather than creating a new CLASSNUMBER_SEMESTER folder, you can more
simply delete the files named ???aid.lcs and ???aid.cid. This will
cause the programs to run again from scratch.
-
If you would rather have the (N)AID strings at the end of the line
and/or with a different separator: Microsoft Windows users would
need to open file "run_alpaid.bat" with Notepad, locate the string of
seven "-" parameters, and change the third of them into "E" if they
want the AID put at the end of the lines, and/or change the fifth of
them into "SEP" where SEP is the desired separator. Then run the
run_???aid.bat file (after deleting any left-over alpaid.lcs).
Linux/Unix users would need, for example, use the command
bin/alpaid - - E - "..."
to put AID strings at the end of the lines preceded by three dots.
-
If more students add the course: If you add additional lines
without (N)AID strings to file ???aid....csv and run the program
again, (N)AID strings will be added to the lines that do not yet have
them. Alternatively, if it is just a few additional students, you can
enter the (N)AID strings manually. The first few unused (N)AID
strings can be found printed out near the end of file ???aid.log.
Note: if you want to rerun the program after adding some (N)AID
strings manually, you will first have to update the count of used
(N)AID strings; this is the second number in file ???aid.lcs.
(Extension lcs stands for Limit, Count in use, and Seed.)
For general usage of program alpaid, first read the subsection on
how to add AID strings to a generic CSV file
or
how to add AID strings to a generic text file
depending on what you want to do. Then choose from the below
subtopics:
Unless you are using Canvas, or maybe Blackboard, you will normally
need to give program alpaid some additional information so that it
knows what you want to do. This information is given in the
form of "command parameters".
To set command parameters, Microsoft users need to open file
run_alpaid.bat in the CLASSNUMBER_SEMESTER folder using Notepad.
In that file there is a line
bin\alpaid.exe "-" "-" "-" "-" "-" "-" "-"
in which the final seven "-" strings are the seven command parameters
inside double quotes. If, like here, command parameters are specified
as hyphens, it tells program alpaid to use the "default value" for the
parameter (i.e. it tells alpaid: "Figure it out yourself.").
For Linux/Unix users things are pretty much the same as for Microsoft
users; for default parameters, in a terminal, they would type
bin/alpaid '-' '-' '-' '-' '-' '-' '-'
Note that the quotes around hyphens are not really needed, and
that trailing default parameters can be omitted, so
the above command could be abbreviated to a bare "bin/alpaid".
Whether Microsoft of Linux, the names of the seven parameters are as
shown in the below symbolic command:
bin{\|/}alpaid[.exe] "INFILE" "OUTFILE" "POS" "HEADER" "SEP" "QUOT" "SEED"
For each of the seven parameters INFILE to SEED, if you do not want
the default value that alpaid would use, you need to specify that
parameter as what you do want, instead of as a hyphen. If the value
of a parameter is purely alphanumeric (contains letters and digits
only), you do not need to quote it. (And hyphens, underscores, and
points do not need quoting either; for anything else, including
spaces, quote.)
To set the parameters you need, read their descriptions below:
-
INFILE:
INFILE is the input file to which to add the AID data.
The default for INFILE, used if it is specified as a hyphen or if no
parameters are given, is to try to find a suitably-named file in the
CLASSNUMBER_SEMESTER folder. In particular, alpaid looks for files
named 'alpaid.csv', 'alpaid.xls', or 'alpaid.txt'. It also looks for
files named 'alpaid_?sv.csv' or 'alpaid_?sv.xls' where ? is one of _,
C, D, P, S, T, or V. (This character indicates the field separation
character used in the file; see parameter SEP below.) If it finds
such a file, alpaid takes it as the input file. If it does not find
one, or more than one, it terminates execution with an error message
and a description of the parameters.
File format: Alpaid can handle plain text files. Alpaid can also
handle "Spreadsheet" files, in which the data items (fields) are
organized in a table of rows and columns, if they are in some version
of ".csv" ("comma separated values") format. In particular, in each
line (row) the fields of successive columns should be separated by an
ASCII separator like comma, Tab, semicolon, etcetera. Fields that
contain an internal separator character, internal quote character, or
internal newline should be quoted with an ASCII quote character, which
is usually the double-quote character (").
Internationalization: UTF-8 encoding of the file is no problem for
alpaid, with or without BOM. Nor are most single-byte encodings a
problem. UTF-16 encoding (Microsoft "Unicode") is also supported. The
encoding of the generated output file will be the same as that of the
input file. Program alpaid always tries to maintain the format of the
input file as much as possible.
-
OUTFILE:
OUTFILE is the name of the file to create with the added AID data.
OUTFILE may not be the same file as INFILE; alpaid will
already be writing to OUTFILE while it is still reading INFILE. (Even
if it did not, if something would go wrong half-way in creating
OUTFILE, you would have lost INFILE without getting a correct OUTFILE
in its place.)
The default for OUTFILE, used if it is specified as a hyphen or if
less than two parameters are given, is to prefix "new_" before INFILE.
However, if INFILE contains a colon, slash, or backslash, which may be
"path" characters, alpaid will terminate with an error message rather
than prefix new_.
-
POS:
Parameter POS is the position at which to put the column of AID data,
or the position at which it can be found if already present.
The possible values of POS depend on whether the input file is a CSV
"Spreadsheet" file (including .csv files as produced by Canvas and
Excel and ".xls" files as produced by Blackboard) or just a plain text
file without tabular structure:
-
If the input file is a CSV file, POS can be the column number in which
to put the AID data or else B or C. Column number 1 is the first
column, 2 the second, etcetera. If you specify the column number as
0, alpaid assumes that you want it to be the last column. If you
follow POS by a K, alpaid will kill all columns beyond the AID one
(assuming POS is not 0 or 1). This is intended to speed up the
process of uploading OUTFILE again to your LMS; your LMS does not have
to worry what to do about those columns. If you specify POS as B,
alpaid assumes that this is a Blackboard, tab-separated, .xls file and
will figure out an appropriate position itself. If you specify POS as
C, alpaid assumes that this is a Canvas .csv file and will figure out
an appropriate position itself.
-
If the input file is just a plain text file, POS can be S or E (case
insensitive). If POS is S, the AID data are put at the start of the
lines; if POS is E, the data are put at the end of the lines.
The default for POS, used if it is specified as a hyphen or less than
three parameters are given, depends on the file extension (last four
characters) of INFILE. If the extension is .csv or .xls
(case-insensitive), alpaid assumes the file is some form of CSV file;
it then sets POS equal to B (Blackboard) for a .xls file and equal to
CK (Canvas with kill) for a .csv file. If neither extension applies,
alpaid assumes the input file is a plain text file and sets POS to S.
(Conversely, if POS is explicitly specified, alpaid assumes that the
file is a plain text file if POS is S or E, or some form of CSV file
otherwise, regardless of file extension.)
-
HEADER:
Parameter HEADER should start with a single digit giving the number of
header lines. Header lines are lines at the start of the file that
are not student records. For example, most CSV files start with a
header line that lists the names of the columns. The single digit in
HEADER should be followed by what to put in the AID column in the
header lines. For example, the default header for Canvas mode is
"2AIDsort*,0.00", which tells alpaid that there are two header lines
in the input file, and that it should put AIDsort in the AID column in
the first header line, and 0.00 in the second header line. Note the
use of the comma to separate AIDsort and 0.00. The star is a special
character that deals with the problem that Canvas (as well as
Blackboard) will add an "identification number" behind the column
name. Essentially, the star tells alpaid "just ignore whatever else
Canvas may have put behind the name when you get the file back again".
Note also that "2AIDsort*,0.00" must be quoted, because both
the star and the comma are not alphanumeric and will in fact cause
problems in both Microsoft and Linux/Unix if left unquoted.
The default for HEADER, used if it is specified as a hyphen or less
than four parameters are given, is 0 (no header lines) in plain text
mode. For a CSV file the default is "1AID*", meaning a single header
line with the AID column called "AID", except that Canvas mode has
default "2AIDsort*,0.00" as already mentioned.
Note: If your LMS cannot directly handle the alphanumeric AID strings
themselves, make the name of the AID column AIDsort (case sensitive).
Then alpaid will put AID sort numbers, instead of the actual AID
strings, in the column. Alpaid will create a web page, "alpaid.htm",
as well as a plain text file, alpaid.srt.txt that the students can use
to relate their sort number to their actual AID string.
-
SEP:
For a plain text file (POS equal to S or E) SEP is just the characters
to put in between each AID string and the rest of the line. If you do
not want anything in between, specify SEP as N (for nil).
For a CSV type file, SEP should be the ASCII character that is used in
the input file INFILE to separate the different fields (columns) in a
line. Since CSV means "comma separated values", you would assume this
should always be comma. No such luck! There is no general standard
of what CSV really is, and separator characters are all over the
place: semicolon (continental Europe), Tab (Blackboard), etcetera.
If you are not sure what separator your CSV input file INFILE uses,
open file INFILE with a text editor and have a look. Microsoft users
may want to use Notepad, and Linux/Unix users an editor like gedit.
The Unix nano editor may also work, but not if the input file is
encoded in UTF-16 (Microsoft "Unicode") like Blackboard XLS files.
For plain text files the default for SEP, used if it is specified as a
hyphen or less than five parameters are given, is ": " (colon
followed by a space). For CSV files the normal default is, you
guessed it, comma. However if the input file name ends in .xls, case
insensitive, that is changed to the ASCII Tab character. However, in
either case, if the file name ends in '_?sv.EXT' where EXT is any
three-byte file extension, SEP is taken based on the ASCII character
?. In particular, if ? is C, SEP is set to a comma, if ? is D (double
point), SEP is set to a colon, if ? is P or V, SEP is set to a pipe or
vertical bar (i.e. |), if ? is S, SEP is set to a semicolon, if ? is
T, SEP is set to the ASCII Tab character, and if ? is _ (underscore),
SEP is set to a space.
Make sure to quote SEP. Or if you want, you can use the following
aliases: C for comma, D (double point) for colon, P or V for vertical
bar, S for semicolon, T for Tab, _ for Space, and a single H for a
single hyphen. For plain text files you can also use a single N for
nil.
Note: if you get the separator character wrong for a CSV file, alpaid
will almost surely either crash with an error message like that there
is bad quoting (terminated too early) in INFILE, or a variable number
of columns, or else put everything in a single column. But bad
quoting and a variable number of columns may also be caused by a wrong
QUOT character below. And a bug in Blackboard will actually produce a
variable number of columns with the right SEP (Tab), but alpaid knows
about that and will ignore it.
-
QUOT:
QUOT is the ASCII character used to quote fields in the CSV input
file. So if the input file is a plain text file, QUOT is undefined
and should either be omitted along with the remaining argument or be
specified as a hyphen.
For CSV files, usually QUOT is the ASCII double-quote character (i.e.
"). If in doubt, look at the CSV file with a text editor as
described under SEP. At the time of writing, program alpaid does not
support CSV files that sometimes use double-quotes and sometimes
single quotes (if there actually are such files). Also, by default
program alpaid assumes that if a field contains internal
quote characters, then that field is quoted and the internal quotes
are doubled. That is the way Excel does it, and a LMS would piss off
a lot of users if it misread external files produced by Excel. By
default, alpaid does not quote the fields it adds, as there is no
need. However, if your LMS requires that every field is quoted, you
can follow QUOT by an F to force quoting of the fields. If your LMS
uses backslash to escape internal quotes, instead of doubles them,
terminate the QUOT parameter with a B. (So, as far as I understand
the
Blackboard docs, if you download a CSV file instead of the
recommended XLS to CLASSNUMBER_SEMESTER, the complete QUOT parameter
should be DFB, with D for double-quote, F for forcing quoting of every
field, and B since internal quotes must be preceded by backslash.)
The default for QUOT, used if it is specified as a hyphen or less than
six parameters are given, is of course none for plain text files. For
CSV files the default is the ASCII double-quote character. However,
in Blackboard mode an F is appended to the double-quote to force
quoting. (While
the
Blackboard docs say you do not need to quote the fields in the
.xls file, if you download the .xls file, every field is in
fact quoted, and alpaid tries to be consistent with that.)
Make sure to quote QUOT. Or much safer, you can use the following
aliases: D for double-quote, S for single-quote, H for hyphen, and N
for the ASCII NUL character. I cannot imagine that you would ever
need the last two abbreviations, but better safe than sorry.
Note: Like for SEP, the best way to get QUOT right is to look at the
input file with a text editor.
-
SEED:
SEED is the seed used to initialize the random number generator needed
to sort the AID strings randomly. The special value 1 is replaced by
an unpredictable SEED based on the system time and process ID; any
other value for SEED than 1 is taken as is.
Do note that if file alpaid.lcs exists, the last seed value in it (the
final number in the file) takes priority over whatever is specified as
the command parameter SEED.
The default for SEED, used if it is specified as a hyphen or less than
seven parameters are given, is 1, for a generated unpredictable SEED.
Normally the seed value from alpaid.lcs will not be 1.
Normally, the first time program alpaid runs, it will create the
column it puts the AID data in. But suppose you want to have them put
in an existing column for some unknown reason (like you need to give
special properties to the column in your LMS when it is created). To
tell alpaid that the column already exists, before running alpaid the
first time, use a text editor like Notepad for Microsoft or nano or
gedit for Linux/Unix. Create a file whose first and only line reads
": 0, 0, 1", without the quotes. Save the file in the
CLASSNUMBER_SEMESTER folder as "alpaid.lcs". In doing that, Notepad
users should make sure that "All Files", not "Text Files" is selected
before pressing the Save button, or Notepad will save the file as
"alpaid.lcs.txt". O, what a tangled web we weave when first we
conspire to deceive our customers. Also, Microsoft users must make
sure to save the file as ANSI (do not save as Unicode).
If program alpaid is now run, it will look for an existing column of
the specified name (see parameter HEADER in the
first subsubsection on how to specify it), rather than create a
new column. The data fields in the column should be empty.
Suppose you want to create an entirely new set of AID strings for your
class for some reason. The normal way would be to delete every single
AID string from your class data, download the updated data to the
CLASSNUMBER_SEMESTER folder, and run alpaid again.
This will work as long as there are still enough AID strings
available. If you go into file alpaid.lcs with a text editor like
Notepad, nano, or gedit, of the three numbers at the end of the last
line, the third-last number is how many total AID strings there are
and the second-last how many of these have been used already. Do
not forget to update this second-last number if you have been adding
AID strings manually instead of rerunning program alpaid. The
difference between the third-last and second-last numbers is how many
AID strings are left. To assign completely new AID strings, this
difference should be at least as big as the class size. (If not, you
will need to start from scratch using a different class
distinction number in a different CLASSNUMBER_SEMESTER folder.)
But suppose you find it more convenient to delete the entire AID
column, rather than all the separate entries in it. In that case, you
will need to make a change in the last line of alpaid.lcs (in addition
to any updating as above): delete all the junk in the last line in
front of the final three numbers and replace it with "New: "
(without the quotes). This will tell program alpaid that it needs to
make a new column, rather than look for an existing one.
If you are running low on "class distinction numbers", but your
classes are not that big, you may want to share a set of AID strings
with a single distinction number between two or more different
classes.
There are 232 AID strings in a set, so assume that you want
to make AID strings 1 to 100 available to class 1, 101 to 200 to class
2, and 201 to 232 to the small graduate class 3.
Run alpaid for class 1 normally. Go in the created file alpaid.lcs
with a text editor like Notepad in MS Windows or nano or gedit in
Linux/Unix, and change the first of the final three numbers (the
Limit) from 232 to 100. This will forbid alpaid from creating more
than 100 AID strings for class 1. The second number, the Count of AID
strings already in use, should of course be less than 100 or the limit
is exceeded already.
Next copy alpaid.lcs into the CLASSNUMBER_SEMESTER folder of class 2.
Go into the copied file with the text editor, and change the first
number, the limit, into 200, and change the second number, the used
count, into 100. The latter will cause alpaid to start with AID
string 101 in giving AID strings to class 2. Leave the final number,
the Seed, as it is. This must be the same in all three classes. In
addition, you need to replace all the junk in front of the three
numbers by the string "New: ", without the double quotes and
case-sensitive. Now run alpaid normally.
For class 3, do the same as for class 2, but make the limit 232 and
the used count 200. The generic initial pattern of the three
alpaid.lcs files is
class 1 alpaid.lcs (after running alpaid): ...: LIMIT1, INUSE1, SEED
class 2 alpaid.lcs (before running alpaid): New: LIMIT2, LIMIT1, SEED
class 3 alpaid.lcs (before running alpaid): New: 232, LIMIT2, SEED
where the 232 limit was originally in the first alpaid.lcs file,
LIMIT1 was chosen as 100 and LIMIT2 was chosen as 200.
You might need to add both AID strings and AID sort numbers to your
class data. In "Canvas mode", program alpaid does already do this by
itself; in particular it will put the AID sort numbers in a column
"AIDsort", and, if the input file has an existing Notes column, put
both the AID string and the sort number in that Notes column. This
subsubsection assumes that you are not using Canvas mode, but do want
to add both AID strings and sort numbers to the input file.
To do so, you will need to run program alpaid twice. The first time,
run it normally, and make sure that the name of the new column to add
is AIDsort, case sensitive. This will create a new column of AID sort
numbers. In the second run, change the command parameters
appropriately, like the column number to put the AID strings in and
the name of the column to put them in, using the procedure described
in the first subsubsection. Then:
- If a column of that name already exists: Make sure the
column is blank below the header. Go in the file alpaid.lcs created
by the first run with a text editor like Notepad in MS Windows or nano
or gedit in Linux/Unix, and change the second of the final three
numbers (the Count in use) from whatever it is into 0. Do not change
the last number, the seed. This will cause the same AID strings to be
generated as in the first run. But now the AID strings will be put in
instead of the sort numbers.
- If a column of that name must be created: do the same as
above, but in addition change all the junk in front of the final three
numbers into the string "New: ", without the double quotes and
case-sensitive. This will tell program alpaid that despite the
presence of file alpaid.lcs, the column must be created.
If you want to run the program again twice to add more AID
sort numbers and strings to the updated file, the first time run it
normally to put in the additional sort numbers, but before doing so,
write down the count in use in alpaid.lcs. Then before the second run
to put in the additional AID strings, reset the count in use to what
you wrote down. (In the second run, the AID strings column should now
of course exist, so do not use "New: ".)
For general usage of program numaid, first read the subsection on
how to add NAID numbers to a generic CSV file
or
how to add NAID numbers to a generic text file
depending on what you want to do. Then choose from the below
subtopics:
Unless you are using Canvas, or maybe Blackboard, you will normally
need to give program numaid some additional information so that it
knows what you want to do. This information is given in the
form of "command parameters".
To set command parameters, Microsoft users need to open file
run_numaid.bat in the CLASSNUMBER_SEMESTER folder using Notepad.
In that file there is a line
bin\numaid.exe "-" "-" "-" "-" "-" "-" "-"
in which the final seven "-" strings are the seven command parameters
inside double quotes. If, like here, command parameters are specified
as hyphens, it tells program numaid to use the "default value" for the
parameter (i.e. it tells numaid: "Figure it out yourself.").
For Linux/Unix users things are pretty much the same as for Microsoft
users; for default parameters, in a terminal, they would type
bin/numaid '-' '-' '-' '-' '-' '-' '-'
Note that the quotes around hyphens are not really needed, and
that trailing default parameters can be omitted, so
the above command could be abbreviated to a bare "bin/numaid".
Whether Microsoft of Linux, the names of the seven parameters are as
shown in the below symbolic command:
bin{\|/}numaid[.exe] "INFILE" "OUTFILE" "POS" "HEADER" "SEP" "QUOT" "SEED"
For each of the seven parameters INFILE to SEED, if you do not want
the default value that numaid would use, you need to specify that
parameter as what you do want, instead of as a hyphen. If the value
of a parameter is purely alphanumeric (contains letters and digits
only), you do not need to quote it. (And hyphens, underscores, and
points do not need quoting either; for anything else, including
spaces, quote.)
To set the parameters you need, read their descriptions below:
-
INFILE:
INFILE is the input file to which to add the NAID numbers.
The default for INFILE, used if it is specified as a hyphen or if no
parameters are given, is to try to find a suitably-named file in the
CLASSNUMBER_SEMESTER folder. In particular, numaid looks for files
named 'numaid.csv', 'numaid.xls', or 'numaid.txt'. It also looks for
files named 'numaid_?sv.csv' or 'numaid_?sv.xls' where ? is one of _,
C, D, P, S, T, or V. (This character indicates the field separation
character used in the file; see parameter SEP below.) If it finds
such a file, numaid takes it as the input file. If it does not find
one, or more than one, it terminates execution with an error message
and a description of the parameters.
File format: Numaid can handle plain text files. Numaid can also
handle "Spreadsheet" files, in which the data items (fields) are
organized in a table of rows and columns, if they are in some version
of ".csv" ("comma separated values") format. In particular, in each
line (row) the fields of successive columns should be separated by an
ASCII separator like comma, Tab, semicolon, etcetera. Fields that
contain an internal separator character, internal quote character, or
internal newline should be quoted with an ASCII quote character, which
is usually the double-quote character (").
Internationalization: UTF-8 encoding of the file is no problem for
numaid, with or without BOM. Nor are most single-byte encodings a
problem. UTF-16 encoding (Microsoft "Unicode") is also supported. The
encoding of the generated output file will be the same as that of the
input file. Program numaid always tries to maintain the format of the
input file as much as possible.
-
OUTFILE:
OUTFILE is the name of the file to create with the added NAID numbers.
OUTFILE may not be the same file as INFILE; numaid will
already be writing to OUTFILE while it is still reading INFILE. (Even
if it did not, if something would go wrong half-way in creating
OUTFILE, you would have lost INFILE without getting a correct OUTFILE
in its place.)
The default for OUTFILE, used if it is specified as a hyphen or if
less than two parameters are given, is to prefix "new_" before INFILE.
However, if INFILE contains a colon, slash, or backslash, which may be
"path" characters, numaid will terminate with an error message rather
than prefix new_.
-
POS:
Parameter POS is the position at which to put the column of NAID numbers,
or the position at which it can be found if already present.
The possible values of POS depend on whether the input file is a CSV
"Spreadsheet" file (including .csv files as produced by Canvas and
Excel and ".xls" files as produced by Blackboard) or just a plain text
file without tabular structure:
-
If the input file is a CSV file, POS can be the column number in which
to put the NAID numbers or else B or C. Column number 1 is the first
column, 2 the second, etcetera. If you specify the column number as
0, numaid assumes that you want it to be the last column. If you
follow POS by a K, numaid will kill all columns beyond the NAID one
(assuming POS is not 0 or 1). This is intended to speed up the
process of uploading OUTFILE again to your LMS; your LMS does not have
to worry what to do about those columns. If you specify POS as B,
numaid assumes that this is a Blackboard, tab-separated, .xls file and
will figure out an appropriate position itself. If you specify POS as
C, numaid assumes that this is a Canvas .csv file and will figure out
an appropriate position itself.
-
If the input file is just a plain text file, POS can be S or E (case
insensitive). If POS is S, the NAID numbers are put at the start of
the lines; if POS is E, the numbers are put at the end of the lines.
The default for POS, used if it is specified as a hyphen or less than
three parameters are given, depends on the file extension (last four
characters) of INFILE. If the extension is .csv or .xls
(case-insensitive), numaid assumes the file is some form of CSV file;
it then sets POS equal to B (Blackboard) for a .xls file and equal to
CK (Canvas with kill) for a .csv file. If neither extension applies,
numaid assumes the input file is a plain text file and sets POS to S.
(Conversely, if POS is explicitly specified, numaid assumes that the
file is a plain text file if POS is S or E, or some form of CSV file
otherwise, regardless of file extension.)
-
HEADER:
Parameter HEADER should start with a single digit giving the number of
header lines. Header lines are lines at the start of the file that
are not student records. For example, most CSV files start with a
header line that lists the names of the columns. The single digit in
HEADER should be followed by what to put in the NAID column in the
header lines. For example, the default header for Canvas mode is
"2NAID*,0.00", which tells numaid that there are two header lines in
the input file, and that it should put NAID in the NAID column in the
first header line, and 0.00 in the second header line. Note the use
of the comma to separate NAID and 0.00. The star is a special
character that deals with the problem that Canvas (as well as
Blackboard) will add an "identification number" behind the column
name. Essentially, the star tells numaid "just ignore whatever else
Canvas may have put behind the name when you get the file back again".
Note also that "2NAID*,0.00" must be quoted, because both the
star and the comma are not alphanumeric and will in fact cause
problems in both Microsoft and Linux/Unix if left unquoted.
The default for HEADER, used if it is specified as a hyphen or less
than four parameters are given, is 0 (no header lines) in plain text
mode. For a CSV file the default is "1NAID*", meaning a single header
line with the NAID column called "NAID", except that Canvas mode has
default "2NAID*,0.00" as already mentioned.
-
SEP:
For a plain text file (POS equal to S or E) SEP is just the characters
to put in between each NAID number and the rest of the line. If you
do not want anything in between, specify SEP as N (for nil).
For a CSV type file, SEP should be the ASCII character that is used in
the input file INFILE to separate the different fields (columns) in a
line. Since CSV means "comma separated values", you would assume this
should always be comma. No such luck! There is no general standard
of what CSV really is, and separator characters are all over the
place: semicolon (continental Europe), Tab (Blackboard), etcetera.
If you are not sure what separator your CSV input file INFILE uses,
open file INFILE with a text editor and have a look. Microsoft users
may want to use Notepad, and Linux/Unix users an editor like gedit.
The Unix nano editor may also work, but not if the input file is
encoded in UTF-16 (Microsoft "Unicode") like Blackboard XLS files.
For plain text files the default for SEP, used if it is specified as a
hyphen or less than five parameters are given, is ": " (colon
followed by a space). For CSV files the normal default is, you
guessed it, comma. However if the input file name ends in .xls, case
insensitive, that is changed to the ASCII Tab character. However, in
either case, if the file name ends in '_?sv.EXT' where EXT is any
three-byte file extension, SEP is taken based on the ASCII character
?. In particular, if ? is C, SEP is set to a comma, if ? is D (double
point), SEP is set to a colon, if ? is P or V, SEP is set to a pipe or
vertical bar (i.e. |), if ? is S, SEP is set to a semicolon, if ? is
T, SEP is set to the ASCII Tab character, and if ? is _ (underscore),
SEP is set to a space.
Make sure to quote SEP. Or if you want, you can use the following
aliases: C for comma, D (double point) for colon, P or V for vertical
bar, S for semicolon, T for Tab, _ for Space, and a single H for a
single hyphen. For plain text files you can also use a single N for
nil.
Note: if you get the separator character wrong for a CSV file, numaid
will almost surely either crash with an error message like that there
is bad quoting (terminated too early) in INFILE, or a variable number
of columns, or else put everything in a single column. But bad
quoting and a variable number of columns may also be caused by a wrong
QUOT character below. And a bug in Blackboard will actually produce a
variable number of columns with the right SEP (Tab), but numaid knows
about that and will ignore it.
-
QUOT:
QUOT is the ASCII character used to quote fields in the CSV input
file. So if the input file is a plain text file, QUOT is undefined
and should either be omitted along with the remaining argument or be
specified as a hyphen.
For CSV files, usually QUOT is the ASCII double-quote character (i.e.
"). If in doubt, look at the CSV file with a text editor as
described under SEP. At the time of writing, program numaid does not
support CSV files that sometimes use double-quotes and sometimes
single quotes (if there actually are such files). Also, by default
program numaid assumes that if a field contains internal
quote characters, then that field is quoted and the internal quotes
are doubled. That is the way Excel does it, and a LMS would piss off
a lot of users if it misread external files produced by Excel. By
default, numaid does not quote the fields it adds, as there is no
need. However, if your LMS requires that every field is quoted, you
can follow QUOT by an F to force quoting of the fields. If your LMS
uses backslash to escape internal quotes, instead of doubles them,
terminate the QUOT parameter with a B. (So, as far as I understand
the
Blackboard docs, if you download a CSV file instead of the
recommended XLS to CLASSNUMBER_SEMESTER, the complete QUOT parameter
should be DFB, with D for double-quote, F for forcing quoting of every
field, and B since internal quotes must be preceded by backslash.)
The default for QUOT, used if it is specified as a hyphen or less than
six parameters are given, is of course none for plain text files. For
CSV files the default is the ASCII double-quote character. However,
in Blackboard mode an F is appended to the double-quote to force
quoting. (While
the
Blackboard docs say you do not need to quote the fields in the
.xls file, if you download the .xls file, every field is in
fact quoted, and numaid tries to be consistent with that.)
Make sure to quote QUOT. Or much safer, you can use the following
aliases: D for double-quote, S for single-quote, H for hyphen, and N
for the ASCII NUL character. I cannot imagine that you would ever
need the last two abbreviations, but better safe than sorry.
Note: Like for SEP, the best way to get QUOT right is to look at the
input file with a text editor.
-
SEED:
SEED is the seed used to initialize the random number generator needed
to sort the NAID numbers randomly. The special value 1 is replaced by
an unpredictable SEED based on the system time and process ID; any
other value for SEED than 1 is taken as is.
Do note that if file numaid.lcs exists, the last seed value in it (the
final number in the file) takes priority over whatever is specified as
the command parameter SEED.
The default for SEED, used if it is specified as a hyphen or less than
seven parameters are given, is 1, for a generated unpredictable SEED.
Normally the seed value from numaid.lcs will not be 1.
Normally, the first time program numaid runs, it will create the
column it puts the NAID data in. But suppose you want to have them put
in an existing column for some unknown reason (like you need to give
special properties to the column in your LMS when it is created). To
tell numaid that the column already exists, before running numaid the
first time, use a text editor like Notepad for Microsoft or nano or
gedit for Linux/Unix. Create a file whose first and only line reads
": 0, 0, 1", without the quotes. Save the file in the
CLASSNUMBER_SEMESTER folder as "numaid.lcs". In doing that, Notepad
users should make sure that "All Files", not "Text Files" is selected
before pressing the Save button, or Notepad will save the file as
"numaid.lcs.txt". O, what a tangled web we weave when first we
conspire to deceive our customers. Also, Microsoft users must make
sure to save the file as ANSI (do not save as Unicode).
If program numaid is now run, it will look for an existing column of
the specified name (see parameter HEADER in the
first subsubsection on how to specify it), rather than create a
new column. The data fields in the column should be empty.
Suppose you want to create an entirely new set of NAID numbers for
your class for some reason. The normal way would be to delete every
single NAID number from your class data, download the updated data to
the CLASSNUMBER_SEMESTER folder, and run numaid again.
This will work as long as there are still enough NAID numbers
available. If you go into file numaid.lcs with a text editor like
Notepad, nano, or gedit, of the three numbers at the end of the last
line, the third-last number is how many total NAID numbers there are
and the second-last how many of these have been used already. Do
not forget to update this second-last number if you have been adding
NAID numbers manually instead of rerunning program numaid. The
difference between the third-last and second-last numbers is how many
NAID numbers are left. To assign completely new NAID numbers, this
difference should be at least as big as the class size. (If not, you
will need to start from scratch using a different class
distinction digit in a different CLASSNUMBER_SEMESTER folder.)
But suppose you find it more convenient to delete the entire NAID
column, rather than all the separate entries in it. In that case, you
will need to make a change in the last line of numaid.lcs (in addition
to any needed updating as above): delete all the junk in the last line
in front of the final three numbers and replace it with "New: "
(without the quotes). This will tell program numaid that it needs to
make a new column, rather than look for an existing one.
If you are running low on "class distinction numbers", but your
classes are not that big, you may want to share a set of NAID numbers
with a single distinction number between two or more different
classes.
There are about 300 NAID numbers in a set. More precisely, there are
323 numbers for class distinction digit 2, 4, 6, and 8; 313 for
distinction digit 1, 3, 7, and 9; 316 for distinction digit 0, and 296
for distinction digit 5. We will call this number of available NAID
numbers LIMIT0. Assume that you want to make NAID numbers 1 to 100
available to class 1, 101 to 200 to class 2, and 201 to LIMIT0 to
class 3.
Run numaid for class 1 normally. Go in the created file numaid.lcs
with a text editor like Notepad in MS Windows or nano or gedit in
Linux/Unix, and change the first of the final three numbers (which
should be LIMIT0) from LIMIT0 to 100. This will forbid numaid from
creating more than 100 NAID numbers for class 1. The second number,
the Count of NAID numbers already in use, should of course be less
than 100 or the limit is exceeded already.
Next copy numaid.lcs into the CLASSNUMBER_SEMESTER folder of class 2.
Go into the copied file with the text editor, and change the first
number, the limit, into 200, and change the second number, the used
count, into 100. The latter will cause numaid to start with NAID
number 101 in giving NAID numbers to class 2. Leave the final number,
the Seed, as it is. This must be the same in all three classes. In
addition, you need to replace all the junk in front of the three
numbers by the string "New: ", without the double quotes and
case-sensitive. Now run numaid normally.
For class 3, do the same as for class 2, but make the limit LIMIT0 and
the used count 200. The generic initial pattern of the three
numaid.lcs files is
class 1 numaid.lcs (after running numaid): ...: LIMIT1, INUSE1, SEED
class 2 numaid.lcs (before running numaid): New: LIMIT2, LIMIT1, SEED
class 3 numaid.lcs (before running numaid): New: LIMIT0, LIMIT2, SEED
where LIMIT0 was originally in the first numaid.lcs file, LIMIT1 was
chosen as 100 and LIMIT2 was chosen as 200.