--- loncom/interface/lonsearchcat.pm 2008/02/13 11:20:24 1.290 +++ loncom/interface/lonsearchcat.pm 2008/08/27 19:50:46 1.299 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.290 2008/02/13 11:20:24 bisitz Exp $ +# $Id: lonsearchcat.pm,v 1.299 2008/08/27 19:50:46 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -266,7 +266,7 @@ sub handler { ## Configure dynamic components of interface ## if ($env{'form.catalogmode'} eq 'interactive') { - $closebutton=" END } else { @@ -759,11 +760,6 @@ sub setup_basic_search { $r->dir_config('lonDefDomain')), $r->dir_config('lonDefDomain')). ''; - if ($area eq 'res') { - $inclext= ''; - } $adv_search_link = '\n"; - $scrout .= " ".&mt('(Month - Day - Year)')."\n"; + $scrout .= " ".&mt('Month[_1]Day[_2]Year',' 'x14,' 'x6)."\n"; my $cafter = &Apache::lonhtmlcommon::date_setter('advsearch', # formname 'creationdate1', # fieldname @@ -2126,6 +2117,10 @@ sub copyright_check { ($env{'user.domain'} ne $resdom)) { return 0; } + # Check for custom rights + if ($Metadata->{'copyright'} eq 'custom') { + return &Apache::lonnet::customaccess('bre',$Metadata->{'url'}); + } return 1; } @@ -2494,8 +2489,6 @@ sub run_search { $r->print(< - END # Remove leading and trailing
$pretty_string =~ s:^\s*
::i; @@ -2506,7 +2499,7 @@ END pop(@Lines); } if (@Lines > 2) { - $pretty_string = join '
',(@Lines[0..2],'....
'); + $pretty_string = join '
',(@Lines[0..2],'...
'); } $r->print(&mt("Search: [_1]",$pretty_string)); $r->rflush(); @@ -2561,18 +2554,22 @@ END my $server; my $status; my $revise = &revise_button(); - $r->print(< -StatusTotal MatchesTime Remaining - - - - -$revise - - - -END + $r->print('
'."\n". + ''."\n". + '' + .'' + .'' + .&Apache::loncommon::end_data_table_header_row() + .&Apache::loncommon::start_data_table_row() + .'' + .'' + .'' + .&Apache::loncommon::end_data_table_row() + .&Apache::loncommon::end_data_table() + .'
'."\n". + &Apache::loncommon::start_data_table()); + $r->print(&Apache::loncommon::start_data_table_header_row() + .''.&mt('Status').''.&mt('Total Matches').''.&mt('Time Remaining').' '.$revise.'
'); $r->rflush(); &reset_timing(); &update_seconds($r); @@ -2644,8 +2641,6 @@ END my %Fields = &parse_raw_result($result,$server,$tabletype); $Fields{'hostname'} = $server; # - # Skip if external and we did not want that - next if ((! $env{'form.inclext'}) && ($Fields{'url'}=~/^\/ext\//)); # Skip based on copyright next if (! ©right_check(\%Fields));