--- loncom/interface/loncommon.pm 2009/12/07 17:11:49 1.925.2.1 +++ loncom/interface/loncommon.pm 2009/12/08 05:00:15 1.925.2.3 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.925.2.1 2009/12/07 17:11:49 raeburn Exp $ +# $Id: loncommon.pm,v 1.925.2.3 2009/12/08 05:00:15 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4527,6 +4527,7 @@ sub bodytag { if ($no_nav_bar || $env{'form.inhibitmenu'} eq 'yes') { return $bodytag; } + my $custommenu = &needs_gci_custom(); if ($env{'request.state'} eq 'construct') { $forcereg=1; } @@ -4548,7 +4549,7 @@ sub bodytag { $bodytag .= qq|
|; $bodytag .= Apache::lonhtmlcommon::scripttag( - Apache::lonmenu::utilityfunctions(), 'start'); + Apache::lonmenu::utilityfunctions('',$custommenu), 'start'); $bodytag .= Apache::lonmenu::primary_menu(); @@ -4559,7 +4560,11 @@ sub bodytag { #don't show menus for public users if($env{'user.name'} ne 'public' && $env{'user.domain'} ne 'public'){ - $bodytag .= Apache::lonmenu::secondary_menu(); + if ($custommenu) { + $bodytag .= &Apache::lonmenu::gci_secondary_menu(); + } else { + $bodytag .= Apache::lonmenu::secondary_menu(); + } $bodytag .= Apache::lonmenu::serverform(); $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end'); if ($env{'request.state'} eq 'construct') { @@ -10772,19 +10777,9 @@ sub existing_gcitest_courses { } my ($tstart,$tend) = split(':',$env{$envkey}); if (((!$tstart) || ($tstart < $now)) && ((!$tend) || ($tend > $now))) { - my %coursehash = &Apache::lonnet::coursedescription($cdom.'/'.$cnum); - $courses{$cdom.'_'.$cnum}{'description'} = $coursehash{'description'}; - $courses{$cdom.'_'.$cnum}{'owner'} = $coursehash{'internal.courseowner'}; - if (defined($coursehash{'default_enrollment_start_date'}) ) { - $courses{$cdom.'_'.$cnum}{'startaccess'} = - &Apache::lonlocal::locallocaltime($coursehash{'default_enrollment_start_date'}); - } - if (defined($coursehash{'default_enrollment_end_date'}) ) { - $courses{$cdom.'_'.$cnum}{'endaccess'} = - &Apache::lonlocal::locallocaltime($coursehash{'default_enrollment_end_date'}); - if ($coursehash{'default_enrollment_end_date'} == 0) { - $courses{$cdom.'_'.$cnum}{'endaccess'} = &mt('No ending date'); - } + my $descr = $env{'course.'.$cdom.'_'.$cnum.'.description'}; + if ($descr ne '') { + $courses{$cdom.'_'.$cnum}{'description'} = $descr; } } }