Forum archive 2000-2006

Eugene (Bud) Boman - "Foreign classlists"

Eugene (Bud) Boman - "Foreign classlists"

by Arnold Pizer -
Number of replies: 0
inactiveTopic"Foreign classlists" topic started 8/1/2005; 3:49:07 PM
last post 8/2/2005; 3:52:26 PM
userEugene (Bud) Boman - "Foreign classlists"  blueArrow
8/1/2005; 3:49:07 PM (reads: 849, responses: 3)
Hi,

I'm sure this is a problem that has been solved multiple times but I can't seem to find it in the archives. Could someone either point me to the existing solution or answer my questions below, please?

Naturally Penn State's electronically generated classlists are in a different format than U. of Rochester's. I've written a PSU --> UR translator in perl which seems to work reasonably well on the command line, but I'd really prefer to have it be called as a subroutine either when I upload or import the classlist. (I'm trying to expand the use of WW 2.1 at Penn State and it's is easier to convince people to give it a try if things are seamless.)

Unfortunately I don't yet know much about the logical structure of WW. Could someone tell me where to store the subroutine so that WW 2.1 can find it? Also which makes more sense calling the subroutine after uploading or before importing?

-- Bud

<| Post or View Comments |>


userSam Hathaway - Re:  blueArrow
8/1/2005; 6:21:50 PM (reads: 1028, responses: 0)
The file lib/WeBWorK/File/Classlist.pm is responsible for parsing and writing classlist files. This file would be the appropriate place to add support for PSU's classlist format.
-sam

<| Post or View Comments |>


userJohn Jones - Re:  blueArrow
8/1/2005; 10:49:54 PM (reads: 1021, responses: 0)
One way of making this configurable would be to have an entry in global.conf which gives the translations between the entry webwork wants and the column number of the desired information. Here, I am assuming that the local roster information is stored as cvs. This might satisfy the needs of many institutions.

Another way to make it easy to adapt for individual institutions is to have a hash of column headers. Of course, this assumes that the csv comes with a first row of column headings. This approach is more useful if people can get rosters with varying amount of information so that first name doesn't always appear in column 4, but it may always appear in a column labelled "Fname".

John

<| Post or View Comments |>


userEugene (Bud) Boman - Re:  blueArrow
8/2/2005; 3:52:26 PM (reads: 1054, responses: 0)
I agree. This would address the needs of many intitutions so it might be worth considering. It won't work for everyone though. For instance, Penn State's classlists don't come with the first and last names separated (though everything else is), so a bit of perl code would be needed for me to get the fields right. Guys like me will still have to massage the classlists a little bit, but separating one field into two is simpler than re-writing the whole list. I think this is an idea worth considering.

I'm on to bigger problems though. Still can't seem to get the classlist parser to work with WW. Works on the command line though. Most likely this is because my perl skills -- which were once pretty good -- are now about 12 years old. <sigh>

-- Bud

<| Post or View Comments |>