--- loncom/interface/loncommon.pm 2007/07/11 20:32:15 1.548 +++ loncom/interface/loncommon.pm 2007/07/28 21:38:29 1.555 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.548 2007/07/11 20:32:15 albertel Exp $ +# $Id: loncommon.pm,v 1.555 2007/07/28 21:38:29 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -709,8 +709,7 @@ sub help_open_topic { my ($topic, $text, $stayOnPage, $width, $height) = @_; $text = "" if (not defined $text); $stayOnPage = 0 if (not defined $stayOnPage); - if ($env{'browser.interface'} eq 'textual' || - $env{'environment.remote'} eq 'off' ) { + if ($env{'browser.interface'} eq 'textual') { $stayOnPage=1; } $width = 350 if (not defined $width); @@ -802,12 +801,17 @@ ENDOUTPUT # now just updates the help link and generates a blue icon sub help_open_menu { my ($topic,$component_help,$faq,$bug,$stayOnPage,$width,$height,$text) - = @_; - + = @_; $stayOnPage = 0 if (not defined $stayOnPage); - if ($env{'browser.interface'} eq 'textual' || - $env{'environment.remote'} eq 'off' ) { - $stayOnPage=1; + # formerly only used pop-up help (stayOnPage = 0) + # if environment.remote is on (using remote control UI) + # if ($env{'browser.interface'} eq 'textual' || + # $env{'environment.remote'} eq 'off' ) { + # $stayOnPage=1; + #} + # Now making pop-up help the default even with remote control + if ($env{'browser.interface'} eq 'textual') { + $stayOnPage=1; } my $output; if ($component_help) { @@ -1263,8 +1267,10 @@ sub domain_select { } &Apache::lonnet::all_domains(); if ($multiple) { $domains{''}=&mt('Any domain'); + $domains{'select_form_order'} = [sort {lc($a) cmp lc($b) } (keys(%domains))]; return &multiple_select_form($name,$value,4,\%domains); } else { + $domains{'select_form_order'} = [sort {lc($a) cmp lc($b) } (keys(%domains))]; return &select_form($name,$value,%domains); } } @@ -1430,7 +1436,7 @@ selected"); #------------------------------------------- sub select_dom_form { my ($defdom,$name,$includeempty) = @_; - my @domains = sort(&Apache::lonnet::all_domains()); + my @domains = sort {lc($a) cmp lc($b)} (&Apache::lonnet::all_domains()); if ($includeempty) { @domains=('',@domains); } my $selectdomain = "'; + + my @srchins = ('crs','dom','alc','instd'); + + foreach my $option (@srchins) { + # FIXME 'alc' option unavailable until + # loncreateuser::print_user_query_page() + # has been completed. + next if ($option eq 'alc'); + next if ($option eq 'crs' && !$env{'request.course.id'}); + if ($curr_selected{'srchin'} eq $option) { + $srchinsel .= ' + '; + } else { + $srchinsel .= ' + '; + } + } + $srchinsel .= "\n \n"; + + my $srchbysel = ' \n"; + + my $srchtypesel = ' \n"; + + my $output = <<"END_BLOCK"; + + + + + + + + + + + + + +
$lt{'usr'}: +$srchtypesel + +$srchbysel +
$lt{'in'}: +$srchinsel +
$lt{'doma'}:$domform
+
+END_BLOCK + if ($forcenewuser) { + $output .= ''.&mt('Make new user if no match found: ').''.&mt('Yes').'  '.&mt('No').'
'; + } + return $output; +} + =pod +=back + +=head1 HTTP Helpers + +=over 4 + =item * get_unprocessed_cgi($query,$possible_names) Modify the %env hash to contain unprocessed CGI form parameters held in