The campus Schedule of Classes is available for you to put on your campus site. Here's how.
Assuming your page is on www.csulb.edu, you can use this include in the content area of your page.
<!--#include virtual="/depts/enrollment/cgi-bin/soc_feed.pl" -->
Pass it the following parameters:
term Fall, Winter, Spring, or Summer. Not case-sensitive.
year Any four-digit year (Fall 2004 is the first term for which we have schedules).
subject The case-sensitive subject code used on the Enrollment site. The best way to find these subject codes is to browse to the schedule you want on the Enrollment Services site and copy the code from the URL. It's the filename minus the ".html".
The page URL for Physical Therapy is http://www.csulb.edu/depts/enrollment/registration/class_schedule/Spring_2006/By_Subject/PzT.html and the subject code is "PzT".
The page URL for Art History is http://www.csulb.edu/depts/enrollment/registration/class_schedule/Spring_2006/By_Subject/AH.html and the subject code is "AH".
This means that you'll need to update your includes if you want to update your schedule pages as the terms roll by. This can be done manually on each page, or with a more sophisticated set of includes that lets you manage your current term and year in one place. Let us know if you want more details on setting variables with server side includes.
If you build an include for which there is no schedule, either because you specified a non-existent subject code or because the subject is just not offered in the term you chose, this include will return HTML like this:
No online Schedule of Classes is available for "BLAW" in Winter 2005
Please check the printed Schedule of Classes or contact the appropriate academic department.
View the complete Schedule of Classes
The parameters above are the ones we currently support. If you need a different slice of the data, you're welcome to subscribe to one or more feed and parse as necessary to get the courses, days, instructors or other patterns you need.
If you do decide to go this route, let us know. Future expansion of the API will be driven largely by your requirements.
The Anthropology feed for Fall 2004 .
<!--#include virtual="/depts/enrollment/cgi-bin/soc_feed.pl?term=Fall&year=2004&subject=ANTH" -->
The Physical Therapy feed for Spring 2006.
<!--#include virtual="/depts/enrollment/cgi-bin/soc_feed.pl?term=spring&year=2006&subject=PzT" -->
A CBA page including the BLAW schedule. This uses an include similar to the ones above, but with the "BLAW" subject code.
All of the layout and color scheme is done with stylesheets that are maintained by the WDC on the Enrollment Services site.
Use this @import rule in the <head> section of your page.
<style type="text/css">
<!--
@import url("http://www.csulb.edu/depts/enrollment/css/classSchedule.css");
-->
</style>
We see a big value in having the schedule of classes presented the same way accross all department sites, so we strongly urge you to not override this default stylesheet unless absolutely necessary.
FYI, the selector (id and class) names were not chosen with as much foresight as we could have wished. This being the case, it may help you to wrap our feed or your other content with a uniquely named selector. Otherwise, you may find unintended effects dinking up the page.
All feed HTML is valid XHTML. Tables are scoped and all content meets campus ADA standards. We intend to maintain this so that you don't need to worry about including content that will break your site.
As part of the feed, we include the default "top" link from the
admin depot:
This points to a named anchor called "topofpage." If the page on which you include the feed does not have this named anchor, the "top" link will be broken. This is not good.
We expect that most people will use the HTML feed, but there is also an XML option that can be called by adding:
format=xml
For example:
XML feed for Fall 2006 Greek classes.
<!--#include virtual="/depts/enrollment/cgi-bin/soc_feed.pl?term=fall&year=2006&subject=GK&format=xml" -->
Notice that there are two main parts to the XML feed: a "meta" branch containing information about the feed and an "html" branch containing the same HTML that you get when requesting the HTML feed. In other words, the XML option wraps the HTML you'd otherwise get and tacks on information about the request.
One of the more useful parts of this metadata is an <exists> flag that tells you if we actually found a feed for the term, year and subject you specified or if we're returning the placeholder text that says "sorry, no such schedule exists."
Included in the feed HTML is a web beacon. This is a 1x1 pixel image that hits the beacon.csulb.edu server. It exists so that we can keep track of which schedule feeds are being used without trying to track department pages individually. No personal data is collected via this beacon.