--- loncom/interface/coursecatalog.pm 2007/03/08 01:58:44 1.20 +++ loncom/interface/coursecatalog.pm 2007/10/02 01:10:27 1.21 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler for displaying the course catalog interface # -# $Id: coursecatalog.pm,v 1.20 2007/03/08 01:58:44 albertel Exp $ +# $Id: coursecatalog.pm,v 1.21 2007/10/02 01:10:27 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -46,14 +46,9 @@ sub handler { if ($r->header_only) { return OK; } - my %cookies=CGI::Cookie->parse($r->header_in('Cookie')); - my $lonid=$cookies{'lonID'}; + my $handle = &Apache::lonnet::check_for_valid_session($r); my $lonidsdir=$r->dir_config('lonIDsDir'); - my $handle; - if ($lonid) { - $handle=&LONCAPA::clean_handle($lonid->value); - } - if ((-e "$lonidsdir/$handle.id") && ($handle ne '')) { + if ($handle ne '') { &Apache::lonnet::transfer_profile_to_env($lonidsdir,$handle); } &Apache::lonacc::get_posted_cgi($r);