--- loncom/interface/lonindexer.pm 2007/06/28 21:42:49 1.164 +++ loncom/interface/lonindexer.pm 2007/07/11 20:32:15 1.170 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.164 2007/06/28 21:42:49 banghart Exp $ +# $Id: lonindexer.pm,v 1.170 2007/07/11 20:32:15 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -241,7 +241,7 @@ END # # if (!defined($mode) || ($mode ne 'edit' && $mode ne 'parmset')) { - my $location = "/adm/groupsort?catalogmode=import&"; + my $location = "/adm/groupsort?&inhibitmenu=yes&catalogmode=import&"; $location .= "mode=".$mode."&"; $location .= "acts="; $catalogmodefunctions=<<"END"; @@ -345,7 +345,9 @@ function queue(val) { END } + my $inhibit_menu = "+'&".&Apache::loncommon::inhibit_menu_check()."'"; # ---------------------------------------------------------------- Print Header + my $js = <<"ENDHEADER"; ENDHEADER @@ -410,8 +414,8 @@ ENDHEADER # sorting through the actions and changing the global database hash foreach my $key (sort {$achash{$a}<=>$achash{$b}} (keys %ahash)) { if ($ahash{$key} eq '1') { - $hash{'store_'.$hash{'pre_'.$key.'_link'}}=1; - # $hash{'pre_'.$key.'_title'}; + $hash{'store_'.$hash{'pre_'.$key.'_link'}}= + $hash{'pre_'.$key.'_title'}; $hash{'storectr_'.$hash{'pre_'.$key.'_link'}}= $hash{'storectr'}+0; $hash{'storectr'}++; @@ -496,6 +500,7 @@ ENDHEADER $closebutton $groupimportbutton END + $r->print(&Apache::loncommon::inhibit_menu_check('input')); # -------------- Filter out sequence containment in crumbs and "recent folders" my $storeuri=$uri; $storeuri='/'.(split(/\.(page|sequence)\/\//,$uri))[-1]; @@ -511,7 +516,7 @@ END if ($reshome) { $r->print("print('javascript:document.forms.fileattr.action="'.$reshome.'";document.forms.fileattr.submit();'); + $r->print('javascript:document.forms.fileattr.action="'.&Apache::loncommon::inhibit_menu_check($reshome).'";document.forms.fileattr.submit();'); } else { $r->print($reshome); } @@ -845,6 +850,7 @@ sub display_line { 'document.forms.fileattr.acts.value)" '. 'enctype="application/x-www-form-urlencoded"'. '>'."\n"); + $r->print(&Apache::loncommon::inhibit_menu_check('input')); $r->print (''."\n"); $r->print (''."\n"); @@ -918,7 +924,11 @@ sub display_line { # display file if (($fnptr == 0 and $filecom[3] ne '') or $absolute) { + my $title; my $filelink = $pathprefix.$filecom[0]; + if ($hash{'display_attrs_0'} == 1) { + $title = &Apache::lonnet::gettitle($filelink); + } my @file_ext = split (/\./,$listname); my $curfext = $file_ext[-1]; if (@Omit) { @@ -951,6 +961,10 @@ sub display_line { $r->print(" />\n"); $r->print(""); $hash{"pre_${fnum}_link"}=$filelink; + $hash{"pre_${fnum}_title"}=$title; + if (!$hash{"pre_${fnum}_title"}) { + $hash{"pre_${fnum}_title"} = 'Not_retrieved'; + } $fnum++; } # Form to open or close sequences @@ -990,13 +1004,13 @@ sub display_line { $r->print("\"\"\n"); my $quotable_filelink = &Apache::loncommon::escape_single($filelink); - $r->print (" $listname "); - + $quotable_filelink = &Apache::loncommon::escape_single($filelink.'.meta'); + &Apache::loncommon::inhibit_menu_check(\$quotable_filelink); $r->print (" (metadata) "); # Close form to open/close sequence if ($filelink=~/\.(page|sequence)$/) { @@ -1004,7 +1018,6 @@ sub display_line { } $r->print("\n"); if ($hash{'display_attrs_0'} == 1) { - my $title = &Apache::lonnet::gettitle($filelink,'title'); $r->print(' '.($title eq '' ? ' ' : $title). ' '."\n"); } @@ -1060,6 +1073,7 @@ sub display_line { if($source eq 'open') { my $sourcelink = &Apache::lonsource::make_link($filelink,$listname); my $quotable_sourcelink = &Apache::loncommon::escape_single($sourcelink); + &Apache::loncommon::inhibit_menu_check(\$quotable_sourcelink); $r->print(''."print(' '.($title eq '' ? ' ' : $title). ' '."\n"); } @@ -1257,6 +1271,7 @@ sub begin_form { $r->print (''. "\n"); $r->print (''."\n"); + $r->print(&Apache::loncommon::inhibit_menu_check('input')); $dnum++; }