--- loncom/interface/lonmenu.pm 2004/11/13 21:07:19 1.129 +++ loncom/interface/lonmenu.pm 2004/11/30 19:08:18 1.131 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.129 2004/11/13 21:07:19 albertel Exp $ +# $Id: lonmenu.pm,v 1.131 2004/11/30 19:08:18 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -69,6 +69,7 @@ sub menubuttons { my $forcereg=shift; my $target =shift; my $registration=shift; + my $titletable=shift; &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']); if ($ENV{'form.inhibitmenu'} eq 'yes') { return ''; } @@ -96,6 +97,7 @@ ENDNAV ENDRELOAD } } + my $form=&serverform(); my $utility=&utilityfunctions(); my $output=(< @@ -107,6 +109,7 @@ $reloadlink $navmaps
+$form ENDMAINMENU if ($registration) { $output.=&innerregister($forcereg,$target); } return $output."
"; @@ -151,8 +154,9 @@ ENDRELOAD } my $reg=''; if ($registration) { - $reg=&innerregister($forcereg,$target); + $reg=&innerregister($forcereg,$target,$titletable); } + my $form=&serverform(); my $utility=&utilityfunctions(); return (< @@ -172,6 +176,7 @@ $navmaps LON-CAPA +$form @@ -225,9 +230,11 @@ sub registerurl { sub innerregister { my $forcereg=shift; my $target = shift; + my $titletable = shift; my $result = ''; my ($uname,$thisdisfn); my $const_space = ($ENV{'request.state'} eq 'construct'); + my $is_const_dir = 0; if ($ENV{'request.noversionuri'} eq '/res/adm/pages/menu.html') { return ''; } @@ -265,6 +272,9 @@ sub innerregister { 'You have new messages
': 'swmenu.setstatus("you have","messages");'); } + if ($ENV{'request.state'} eq 'construct') { + $newmail = $titletable; + } if ($noremote) { $newmail.=''; } @@ -367,14 +377,18 @@ sub innerregister { my ($uname,$thisdisfn) = ($ENV{'request.filename'}=~m|^/home/([^/]+)/public_html/(.*)|); my $currdir = '/priv/'.$uname.'/'.$thisdisfn; - $currdir =~ s#[^/]+$##; - $menuitems=(<$inlineremote[91]$inlineremote[92]$inlineremote[93] ENDINLINE } + if ($const_space && $is_const_dir) { + $inlinebuttons = ''; + } $result =(< // BEGIN LON-CAPA Internal @@ -430,7 +446,6 @@ $newmail $tablestart $inlinebuttons $tableend -$form @@ -1002,6 +1017,15 @@ function gocstr(url,filename) { } } +function golist(url) { + if (url!='' && url!= null) { + currentURL = null; + currentSymb= null; + top.location.href=url; + } +} + + function catalog_info() { loncatinfo=window.open(window.location.pathname+'.meta',"LONcatInfo",'height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'); @@ -1057,7 +1081,11 @@ sub handler { $r->send_http_header; return OK if $r->header_only; - my $form=&serverform(); + my $form; + if ($ENV{'environment.remote'} ne 'off' && + $ENV{'browser.interface'} ne 'textual') { + $form=&serverform(); + } my $bodytag=&Apache::loncommon::bodytag('Main Menu'); my $function='student'; if ($ENV{'request.role'}=~/^(cc|in|ta|ep)/) {