--- loncom/interface/lonsearchcat.pm 2023/12/30 03:56:48 1.331.4.16.2.2 +++ loncom/interface/lonsearchcat.pm 2022/05/29 20:45:41 1.356 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.331.4.16.2.2 2023/12/30 03:56:48 raeburn Exp $ +# $Id: lonsearchcat.pm,v 1.356 2022/05/29 20:45:41 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -176,7 +176,7 @@ sub handler { } my $crumb_text = 'Portfolio Search'; if (@allowed_searches ==2) { - $crumb_text = 'Portfolio and Content Library Search'; + $crumb_text = 'Portfolio and Catalog Search'; } my $target = '_top'; if ((($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) || @@ -308,7 +308,7 @@ END } # if ($env{'form.searchmode'} eq 'advanced') { - my $srchtype = 'Content Library'; + my $srchtype = 'Catalog'; if ($env{'form.area'} eq 'portfolio') { $srchtype = 'Portfolio'; } @@ -442,7 +442,7 @@ sub hidden_field { =pod =over 4 - + =item &print_basic_search_form() Prints the form for the basic search. Sorry the name is so cryptic. @@ -474,7 +474,7 @@ sub setup_basic_search { my ($r,$area,$hidden_fields,$closebutton) = @_; # Define interface components my %lt = &Apache::lonlocal::texthash ( - res => 'Content Library Search', + res => 'LON-CAPA Catalog Search', portfolio => 'Portfolio Search', ); my ($userelatedwords,$onlysearchdomain,$inclext,$adv_search_link,$scrout); @@ -504,7 +504,7 @@ sub setup_basic_search { } else { $singledom = $env{'user.domain'}; $disabled = ' disabled="disabled"'; - $checked = 1; + $checked = 1; } $onlysearchdomain = '
END - my $srchtype = 'Content Library'; + my $srchtype = 'Catalog'; my $jscript; if ($env{'form.area'} eq 'portfolio') { $srchtype = 'Portfolio'; @@ -690,14 +690,16 @@ function additional_metadata() { my $anydomain = 1; if ($env{'form.area'} ne 'portfolio') { unless (&Apache::lonnet::allowed('bre','/res/')) { - $anydomain = 0; + $anydomain = 0; } } $scrout .= &Apache::lonhtmlcommon::row_title(&titlefield(&mt('Domains'))); if ($anydomain) { + my $defdom = &Apache::lonnet::default_login_domain(); + my ($trusted,$untrusted) = &Apache::lonnet::trusted_domains('shared',$defdom); $scrout .= &Apache::loncommon::domain_select('domains', - $env{'form.domains'},1); + $env{'form.domains'},1,$trusted,$untrusted); } else { $scrout .= &Apache::loncommon::select_dom_form($env{'user.domain'}, 'domains','','','',[$env{'user.domain'}],'',1); @@ -2094,20 +2096,6 @@ sub print_sort_form { &Apache::lonnet::logthis(&Apache::lonmysql::get_error()); return; } - my $js =<