--- loncom/interface/lonindexer.pm 2007/06/28 22:28:22 1.165 +++ loncom/interface/lonindexer.pm 2007/07/06 08:34:37 1.169 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.165 2007/06/28 22:28:22 banghart Exp $ +# $Id: lonindexer.pm,v 1.169 2007/07/06 08:34:37 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -357,6 +357,7 @@ function checkAll() { var fieldName = document.forms[i].elements[j].name; if (fieldName == 'filelink') { document.forms[i].elements[j].checked = true; + queue(document.forms[i].name); } } } @@ -369,6 +370,7 @@ function uncheckAll() { var fieldName = document.forms[i].elements[j].name; if (fieldName == 'filelink') { document.forms[i].elements[j].checked = false; + queue(document.forms[i].name); } } } @@ -918,7 +920,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,9 +957,9 @@ sub display_line { $r->print(" />\n"); $r->print(""); $hash{"pre_${fnum}_link"}=$filelink; - $hash{"pre_${fnum}_title"}=&Apache::lonnet::gettitle($filelink,'title'); + $hash{"pre_${fnum}_title"}=$title; if (!$hash{"pre_${fnum}_title"}) { - $hash{"pre_${fnum}_title"} = 'Untitled'; + $hash{"pre_${fnum}_title"} = 'Not_retrieved'; } $fnum++; } @@ -1008,7 +1014,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"); } @@ -1132,7 +1137,7 @@ sub display_line { my $filelink = $startdir.$filecom[0].'/default'; if ($hash{'display_attrs_0'} == 1) { - my $title = &Apache::lonnet::gettitle($filelink,'title'); + my $title = &Apache::lonnet::gettitle($filelink); $r->print(' '.($title eq '' ? ' ' : $title). ' '."\n"); }