--- loncom/interface/domainprefs.pm 2010/08/24 13:37:50 1.139 +++ loncom/interface/domainprefs.pm 2010/10/05 18:42:45 1.140 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: domainprefs.pm,v 1.139 2010/08/24 13:37:50 raeburn Exp $ +# $Id: domainprefs.pm,v 1.140 2010/10/05 18:42:45 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2287,9 +2287,17 @@ sub print_coursedefaults { sub print_usersessions { my ($position,$dom,$settings,$rowtotal) = @_; my ($css_class,$datatable,%checked,%choices); + my (%by_ip,%by_location,@intdoms); + &build_location_hashes(\@intdoms,\%by_ip,\%by_location); + if (keys(%by_location) == 0) { + if ($position eq 'top') { + $datatable .= ''. + &mt('Nothing to set here, as the cluster to which this domain belongs only contains this institution.'); + } + } my %lt = &usersession_titles(); my $itemcount = 1; - my $numinrow = 6; + my $numinrow = 5; my $prefix; my @types; if ($position eq 'top') { @@ -2301,8 +2309,6 @@ sub print_usersessions { } my (%current,%checkedon,%checkedoff); my @lcversions = &Apache::lonnet::all_loncaparevs(); - my (%by_ip,%by_location,@intdoms); - &build_location_hashes(\@intdoms,\%by_ip,\%by_location); my @locations = sort(keys(%by_location)); foreach my $type (@types) { $checkedon{$type} = ''; @@ -2325,6 +2331,7 @@ sub print_usersessions { } } foreach my $type (@types) { + next if ($type ne 'version' && !@locations); $css_class = $itemcount%2 ? ' class="LC_odd_row"' : ''; $datatable .= ' '.$lt{$type}.'
@@ -6725,7 +6732,7 @@ sub modify_coursedefaults { } } elsif ($item eq 'anonsurvey_threshold') { $resulttext .= '
  • '.&mt('Responder count required for display of anonymous survey submissions set to [_1].',$defaultshash{'coursedefaults'}{'anonsurvey_threshold'}).'
  • '; - } + } } $resulttext .= ''; } else {