--- loncom/interface/lonhtmlcommon.pm 2009/12/01 18:07:50 1.252 +++ loncom/interface/lonhtmlcommon.pm 2009/12/07 17:30:01 1.253.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.252 2009/12/01 18:07:50 bisitz Exp $ +# $Id: lonhtmlcommon.pm,v 1.253.2.1 2009/12/07 17:30:01 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -72,6 +72,12 @@ sub coursepreflink { } } +sub raw_href_to_link { + my ($message)=@_; + $message=~s/(https?\:\/\/[^\s\'\"]+)(\s|$)/$1<\/tt><\/a>$2/gi; + return $message; +} + ############################################## ############################################## @@ -1372,19 +1378,15 @@ returns: nothing # The first one should be the course or a menu link if (!defined($menulink)) { $menulink=1; } if ($menulink) { - my $description = 'Menu'; - my $no_mt_descr = 0; - if (exists($env{'request.course.id'}) && - $env{'request.course.id'} ne '') { - $description = - $env{'course.'.$env{'request.course.id'}.'.description'}; - $no_mt_descr = 1; + unless ($menulink eq '_nomenu') { + my $description = 'Menu'; + my $no_mt_descr = 0; + $menulink = { href =>'/adm/menu', + title =>'Go to main menu', + target =>'_top', + text =>$description, + no_mt =>$no_mt_descr, }; } - $menulink = { href =>'/adm/menu', - title =>'Go to main menu', - target =>'_top', - text =>$description, - no_mt =>$no_mt_descr, }; if($last) { #$last set, so we have some crumbs unshift(@Crumbs,$menulink);