[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface domainprefs.pm
raeburn
raeburn at source.lon-capa.org
Wed Jan 9 16:37:05 EST 2013
raeburn Wed Jan 9 21:37:05 2013 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface domainprefs.pm
Log:
- For 2.11
- Backport 1.175, 1.177, 1.178, 1.183, 1.184, 1.185.
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.160.6.12 loncom/interface/domainprefs.pm:1.160.6.13
--- loncom/interface/domainprefs.pm:1.160.6.12 Fri Jan 4 05:38:15 2013
+++ loncom/interface/domainprefs.pm Wed Jan 9 21:37:04 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.160.6.12 2013/01/04 05:38:15 raeburn Exp $
+# $Id: domainprefs.pm,v 1.160.6.13 2013/01/09 21:37:04 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -45,7 +45,7 @@
=head1 OVERVIEW
Each institution using LON-CAPA will typically have a single domain designated
-for use by individuals affliated with the institution. Accordingly, each domain
+for use by individuals affiliated with the institution. Accordingly, each domain
may define a default set of logos and a color scheme which can be used to "brand"
the LON-CAPA instance. In addition, an institution will typically have a language
and timezone which are used for the majority of courses.
@@ -368,7 +368,7 @@
help => 'Domain_Configuration_Load_Balancing',
header => [{col1 => 'Balancers',
col2 => 'Default destinations',
- col3 => 'User affliation',
+ col3 => 'User affiliation',
col4 => 'Overrides'},
],
},
@@ -384,12 +384,14 @@
col2 => 'Value'}],
};
}
+
my @roles = ('student','coordinator','author','admin');
my @actions = &Apache::loncommon::get_env_multiple('form.actions');
&Apache::lonhtmlcommon::add_breadcrumb
({href=>"javascript:changePage(document.$phase,'pickactions')",
text=>"Settings to display/modify"});
my $confname = $dom.'-domainconfig';
+
if ($phase eq 'process') {
&Apache::lonconfigsettings::make_changes($r,$dom,$phase,$context,\@prefs_order,\%prefs,\%domconfig,$confname,\@roles);
} elsif ($phase eq 'display') {
@@ -809,7 +811,7 @@
'<td><select name="'.$lonhost.'_server">'.
'<option value=""'.$direct.'>'.$choices{'directlogin'}.
'</option>';
- foreach my $hostid (keys(%servers)) {
+ foreach my $hostid (sort(keys(%servers))) {
next if ($servers{$hostid} eq $servers{$lonhost});
my $selected = '';
if (ref($disallowed{$lonhost}) eq 'HASH') {
@@ -1338,6 +1340,7 @@
}
$datatable .= '<td class="LC_right_item">'.
'<table border="0"><tr>';
+
foreach my $item (@{$bgs}) {
$datatable .= '<td align="center">';
my $color = $designs->{'bgs'}{$item} ? $designs->{'bgs'}{$item} : $defaults->{'bgs'}{$item};
@@ -1374,7 +1377,6 @@
}
$datatable .= '<br /><input type="text" size="8" class="colorchooser" name="'.$role.'_'.$item.'" value="'.$color.
'" /></td>';
-
}
$$rowtotal += $itemcount;
return $datatable;
@@ -1963,7 +1965,7 @@
$datatable .= '<span class="LC_nobreak"><label>'.
'<input type="checkbox" name="reqapprovalnotify" '.
'value="'.$domcoord[$i].'"'.$check.'/>'.
- $fullname.'</label></span></td>';
+ $fullname.' ('.$uname.':'.$udom.')</label></span></td>';
}
$datatable .= '</tr></table>';
} else {
@@ -2756,7 +2758,10 @@
$css_class = $itemcount%2 ? ' class="LC_odd_row"' : '';
$datatable .= '<tr'.$css_class.'>
<td rowspan="2">
- <span class="LC_nobreak"><b>'.$server.'</b> when busy, offloads to:</span></td>'."\n";
+ <span class="LC_nobreak">'.
+ &mt('[_1] when busy, offloads to:'
+ ,'<b>'.$server.'</b>').
+ "\n";
my (%current,%canselect);
my @choices =
&possible_newspares($server,$spareid->{$server},$serverhomes,$altids);
@@ -5577,7 +5582,7 @@
print $logfile "\nWrite metadata file for ".$targetdir.'/'.$file;
my $mfh;
if (open($mfh,'>'.$targetdir.'/'.$file.'.meta')) {
- foreach (sort keys %metadatafields) {
+ foreach (sort(keys(%metadatafields))) {
unless ($_=~/\./) {
my $unikey=$_;
$unikey=~/^([A-Za-z]+)/;
@@ -6308,13 +6313,16 @@
foreach my $item (@types) {
if ($changes{$item}) {
my $newtxt = $offon[$newvals{$item}];
- $resulttext .= '<li>'.&mt("$title{$item} set to [_1]$newtxt [_2]",'<b>','</b>').'</li>';
+ $resulttext .= '<li>'.
+ &mt("$title{$item} set to [_1]$newtxt [_2]",
+ '<b>','</b>').
+ '</li>';
}
}
if ($changes{'xmldc'}) {
my ($dcname,$dcdom) = split(':',$newvals{'xmldc'});
my $newtxt = &Apache::loncommon::plainname($dcname,$dcdom);
- $resulttext .= '<li>'.&mt("$title{'xmldc'} set to [_1]$newtxt [_2]",'<b>','</b>').'</li>';
+ $resulttext .= '<li>'.&mt("$title{'xmldc'} set to [_1]",'<b>'.$newtxt.'</b>').'</li>';
}
$resulttext .= '</ul>';
} else {
@@ -6460,7 +6468,11 @@
} else {
$chgtext =~ s/\; $//;
}
- $resulttext .= '<li>'.&mt("Users from domain '<span class=\"LC_cusr_emph\">[_1]</span>' permitted to search the institutional directory set to: [_2]",$dom,$chgtext).'</li>';
+ $resulttext .=
+ '<li>'.
+ &mt("Users from domain '[_1]' permitted to search the institutional directory set to: [_2]",
+ '<span class="LC_cusr_emph">'.$dom.'</span>',$chgtext).
+ '</li>';
}
}
}
@@ -6488,7 +6500,7 @@
}
}
$chgtext =~ s/\; $//;
- $resulttext .= '<li>'.&mt("$title{'searchtypes'} set to: \"[_1]\"",$chgtext).'</li>';
+ $resulttext .= '<li>'.&mt($title{'searchtypes'}.' set to: "[_1]"',$chgtext).'</li>';
}
$resulttext .= '</ul>';
} else {
@@ -8455,6 +8467,7 @@
'<input type="radio" name="autocreate_xmldc"'.
' value="'.$dcs[$i].'"'.$check.'/>'.
&Apache::loncommon::plainname($dcname,$dcdom).
+ ' ('.$dcname.':'.$dcdom.')'.
'</label></span></td>';
}
$datatable .= '</tr></table>';
More information about the LON-CAPA-cvs
mailing list