Urrgh. I added new functionality to the Perl myUMBC codebase today, and I had forgotten what a pain it was. You know things are bad when you wrote the code, and you have to spend an hour trying to recall how it works. Since it looks like the Perl stuff is going to be around for awhile, I figured I might as well document this process while it’s fresh on my mind. Maybe it’ll save me some time down the road.
Just to clarify… when I speak of myUMBC here, I’m just talking about the Perl stuff, not uPortal. With that in mind, here goes.
Background: Everything in myUMBC is database driven. Every link, table, dropdown menu, heading, etc. that you can see, click on, or otherwise manipulate, has a corresponding entry in a database table. All internal URLs in myUMBC are of the form
The function code tells myUMBC what the end user is currently doing. Most of myUMBC’s core functions (registration, etc.) actually have two function codes, one for the initial screen, and one for the results page. Every function code needs to have an entry in the database. Otherwise the user will get a “not authorized” type error. This is to keep users from entering arbitrary function codes and producing undefined results. The database table that contains all of this stuff is called
BRCTL.PROD_PROG_DESC (don’t ask about the name).
To add to the confusion, myUMBC also has a built-in function mapping table, which maps shorter function names to possibly-longer Perl subroutine names. For example, the Financial Aid Inquiry function I added today has a short name
faidinq which maps to a subroutine
finaid_inquiry. There’s no real reason for doing this, other than shortening the URL.
To make a long story short, first, you need a
PROD_PROG_DESC entry with
PPD_LINK_TYPE set to “function” and
PPD_URL set to the name of the Perl subroutine that builds the initial HTML (which could be a table, dropdown etc). Then, you need a second
PROD_PROG_DESC entry for the results page. This one should have
PPD_URL set to NULL, and
PPD_FUNCTION_NAME should match the Perl subroutine that generates the results page.
That’s basically it… unfortunately, that probably didn’t make much sense unless you’re already intimately familiar with the myUMBC Perl codebase. One of these days I’ll improve and expand on this, to make it fit for general consumption. That’s why it’s in my blog and not the Syscore Wiki..
6/16: Here’s how I made our new Student Parking Registration form come up:
INSERT INTO prod_prog_desc (ppd_prog_id, ppd_url, ppd_desc, ppd_add_date_time,ppd_add_user_id, ppd_link_type, ppd_restrict_access,ppd_auth_level, ppd_function_name, ppd_portal_disposition) VALUES ('NEWPARK', '%2bParkingRegistrationForm','Student Parking Registration (new)', sysdate, 'paulr','myumbc', 'N', 'password', '+ParkingRegistrationForm', 'maximized')
Great to have notes to refer back to..