one of the documented procedures in this installation of the ACS
What it does:
It does just that. It looks at the URL and gets the group type. Right now, it only recognizes 'class' and 'department' and it returns the first of the two that it encounters in the url.
Defined in: /web/philip/tcl/education.tcl

Source code:

    set url_list [ns_conn urlv]
    foreach item $url_list {
	if {[string compare [string tolower $item] class] == 0 || [string compare [string tolower $item] department] == 0} {
	    return [string tolower $item]