--- loncom/interface/loncommon.pm 2007/08/30 20:24:15 1.574
+++ loncom/interface/loncommon.pm 2007/08/31 03:21:27 1.576
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.574 2007/08/30 20:24:15 albertel Exp $
+# $Id: loncommon.pm,v 1.576 2007/08/31 03:21:27 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3505,9 +3505,6 @@ sub bodytag {
if (!$realm) { $realm=' '; }
# Set messages
my $messages=&domainlogo($domain);
-# Port for miniserver
- my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'};
- if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; }
my $extra_body_attr = &make_attr_string($forcereg,\%design);
@@ -3625,7 +3622,7 @@ ENDROLE
my $imgsrc = $img;
if ($img =~ /^\/adm/) {
- $imgsrc = 'http://'.$ENV{'HTTP_HOST'}.':'.$lonhttpdPort.$img;
+ $imgsrc = &lonhttpdurl($img);
}
my $upperleft='';
@@ -4501,6 +4498,10 @@ span.LC_nobreak {
white-space: nowrap;
}
+span.LC_cusr_emph {
+ font-style: italic;
+}
+
table.LC_docs_documents {
background: #BBBBBB;
border-width: 0px;
@@ -5628,7 +5629,7 @@ sub user_picker {
'lastname' => 'last name',
'lastfirst' => 'last name, first name',
'crs' => 'in this course',
- 'dom' => 'in selected domain',
+ 'dom' => 'in selected LON-CAPA domain',
'alc' => 'all LON-CAPA',
'instd' => 'in institutional directory for selected domain',
'exact' => 'is',
@@ -5691,7 +5692,16 @@ sub user_picker {
my ($newuserscript,$new_user_create);
if ($forcenewuser) {
- $new_user_create = '
&"').'" onclick="javascript:setSearch(\'1\','.$caller.');" />
'; + if (ref($srch) eq 'HASH') { + if ($srch->{'srchby'} eq 'uname' && $srch->{'srchtype'} eq 'exact' && $srch->{'srchin'} eq 'dom' && $srch->{'srchdomain'} eq $env{'request.role.domain'}) { + $new_user_create = '&"').'" onclick="javascript:setSearch(\'1\','.$caller.');" />
'; + } else { + $new_user_create = &newuser_radio($caller); + } + } else { + $new_user_create = &newuser_radio($caller); + } + $newuserscript = <<"ENDSCRIPT"; function setSearch(createnew,callingForm) { @@ -5817,6 +5827,11 @@ END_BLOCK return $output; } +sub newuser_radio { + my ($caller) = @_; + return ''.&mt('Make new user if no match found: ').''.&mt('Yes').' '.&mt('No').'