--- loncom/interface/loncommon.pm 2007/06/27 22:43:28 1.539
+++ 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.539 2007/06/27 22:43:28 albertel Exp $
+# $Id: loncommon.pm,v 1.555 2007/07/28 21:38:29 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -240,7 +240,7 @@ Inputs: formname, elementname
formname and elementname specify the name of the html form and the name
of the element the selection from the search results will be placed in.
-=back
+
=cut
sub browser_and_searcher_javascript {
@@ -524,7 +524,8 @@ function uncheckAll(field) {
if (field.length > 0) {
for (i = 0; i < field.length; i++) {
field[i].checked = false ;
- } } else {
+ }
+ } else {
field.checked = false ;
}
}
@@ -708,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);
@@ -801,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) {
@@ -1078,7 +1083,7 @@ sub changable_area {
=pod
=back
-
+
=head1 Excel and CSV file utility routines
=over 4
@@ -1212,7 +1217,7 @@ sub create_workbook {
=item * create_text_file
-Create a file to write to and eventually make available to the usre.
+Create a file to write to and eventually make available to the user.
If file creation fails, outputs an error message on the request object and
return undefs.
@@ -1262,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);
}
}
@@ -1429,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 $krb_msg = &mt('As you did not include the default Kerberos domain to be used for authentication in this class, the institutional data used by the automated enrollment process must include the Kerberos domain for each new student');
+ if ($context eq 'auto') {
+ $outcome .= $krb_msg;
+ } else {
+ $outcome .= ''.$krb_msg.'';
+ }
+ $outcome .= $linefeed;
}
}
if (($args->{'ccdomain'}) && ($args->{'ccuname'})) {
@@ -6768,8 +7083,8 @@ sub construct_course {
# By default, use standard grading
if (!defined($cenv{'grading'})) { $cenv{'grading'} = 'standard'; }
- $outcome .= (' '.&mt('Setting environment').': '.
- &Apache::lonnet::put('environment',\%cenv,$$crsudom,$$crsunum).' ');
+ $outcome .= $linefeed.&mt('Setting environment').': '.
+ &Apache::lonnet::put('environment',\%cenv,$$crsudom,$$crsunum).$linefeed;
#
# Open all assignments
#
@@ -6779,7 +7094,7 @@ sub construct_course {
$storeunder.'.type' => 'date_start');
$outcome .= &mt('Opening all assignments').': '.&Apache::lonnet::cput
- ('resourcedata',\%storecontent,$$crsudom,$$crsunum).' ';
+ ('resourcedata',\%storecontent,$$crsudom,$$crsunum).$linefeed;
}
#
# Set first page
@@ -6806,7 +7121,7 @@ sub construct_course {
(my $outtext,$errtext) = &LONCAPA::map::storemap($map,1);
if ($errtext) { $fatal=2; }
- $outcome .= ($fatal?$errtext:'write ok').' ';
+ $outcome .= ($fatal?$errtext:'write ok').$linefeed;
}
return $outcome;
}