--- loncom/interface/lonmenu.pm 2006/05/30 20:09:25 1.184 +++ loncom/interface/lonmenu.pm 2006/06/28 20:56:00 1.187 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.184 2006/05/30 20:09:25 raeburn Exp $ +# $Id: lonmenu.pm,v 1.187 2006/06/28 20:56:00 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -175,7 +175,7 @@ ENDMAINMENU $lt{'exit'} - + Logo LON-CAPA  @@ -194,22 +194,15 @@ ENDINLINEMENU $navmaps=(<$lt{'nav'} ENDNAV +my $is_group = (&Apache::loncommon::course_type() eq 'Group'); if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { - my $text = $lt{'docs'}; - if ($env{'course.'.$env{'request.course.id'}.'.type'} eq - 'Group') { - $text = $lt{'gdoc'}; - } + my $text = ($is_group) ? $lt{'gdoc'} : $lt{'docs'}; $docs=(<$text ENDDOCS } if ($showgroups) { - my $text = $lt{'groups'}; - if ($env{'course.'.$env{'request.course.id'}.'.type'} eq - 'Group') { - $text = $lt{'teams'}; - } + my $text = ($is_group) ? $lt{'teams'} : $lt{'groups'}; $groups =(<$text ENDGROUPS @@ -940,7 +933,7 @@ sub rawconfig { $prt=~s/\$udom/$udom/g; $prt=~s/\$crs/$crs/g; $prt=~s/\$requested_domain/$requested_domain/g; - my $type = $env{'course.'.$env{'request.course.id'}.'.type'}; + my $type = &Apache::loncommon::course_type(); if ($type eq 'Group') { $desc = &convert_menu_function($desc,$type); } @@ -1272,6 +1265,8 @@ sub get_nav_status { return $navstatus; } +#FIXME this needs to move into mydesktab and the other locations +# the text is generated sub convert_menu_function { my ($rolename,$type) = @_; if ($type eq 'Group') {