[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm
raeburn
raeburn@source.lon-capa.org
Thu, 03 Sep 2009 16:05:20 -0000
raeburn Thu Sep 3 16:05:20 2009 EDT
Modified files:
/loncom/interface lonparmset.pm
Log:
- Don't translate %standard_parms as it's a global and therefore the hash persists with the Apache child.
- Instead, apply &mt() to the individual values as they are needed for display.
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.469 loncom/interface/lonparmset.pm:1.470
--- loncom/interface/lonparmset.pm:1.469 Sat Aug 29 03:06:09 2009
+++ loncom/interface/lonparmset.pm Thu Sep 3 16:05:20 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.469 2009/08/29 03:06:09 raeburn Exp $
+# $Id: lonparmset.pm,v 1.470 2009/09/03 16:05:20 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1185,7 +1185,7 @@
$parmdis = $display;
$parmdis =~ s/\s*\[Part.*$//g;
} else {
- $parmdis = $display;
+ $parmdis = &mt($display);
}
$$allparms{$name}=$parmdis;
if (ref($defkeytype)) {
@@ -2938,9 +2938,10 @@
#
# Ready to print
#
+ my $parmitem = &standard_parameter_names($name);
$r->print(&tablestart().
&Apache::loncommon::start_data_table_row().
- '<td><b>'.&standard_parameter_names($name).
+ '<td><b>'.&mt($parmitem).
'</b></td><td><input type="checkbox" name="del_'.
$thiskey.'" /></td><td>');
$foundkeys++;
@@ -3354,9 +3355,10 @@
$display_value =
&Apache::lonlocal::locallocaltime($display_value);
}
+ my $parmitem = &standard_parameter_names($data{'parameter_name'});
+ $parmitem = &mt($parmitem);
$r->print(&mt('Parameter: "[_1]" with value: "[_2]"',
- &standard_parameter_names($data{'parameter_name'}),
- $resourcedata->{$thiskey}));
+ $parmitem,$resourcedata->{$thiskey}));
$r->print('<br />');
if ($data{'scope_type'} eq 'all') {
$r->print(&mt('All users'));
@@ -4236,7 +4238,6 @@
close($config);
$standard_parms{'int_pos'} = 'Positive Integer';
$standard_parms{'int_zero_pos'} = 'Positive Integer or Zero';
- %standard_parms=&Apache::lonlocal::texthash(%standard_parms);
}
sub standard_parameter_names {
@@ -4358,15 +4359,18 @@
} else {
$makenewrow=1;
}
+ my $parmitem = &standard_parameter_names($parmname);
$output .='<td>'.$realm.'</td><td>'.$section.'</td><td>'.
- &standard_parameter_names($parmname).'</td><td>'.
+ &mt($parmitem).'</td><td>'.
($part?&mt('Part: [_1]',$part):&mt('All Parts')).'</td><td>';
my $stillactive=0;
if ($parmlog{$id}{'delflag'}) {
$output .= &mt('Deleted');
} else {
if ($typeflag) {
- $output .= &mt('Type: [_1]',&standard_parameter_names($value));
+ my $parmitem = &standard_parameter_names($value);
+ $parmitem = &mt($parmitem);
+ $output .= &mt('Type: [_1]',$parmitem);
} else {
my ($level,@all)=&parmval_by_symb($what,$middle,&Apache::lonnet::metadata($middle,$what),
$uname,$udom,$issection,$issection,$courseopt);
@@ -4394,8 +4398,11 @@
}
}
$output .= '</td><td>';
+
if ($stillactive) {
- my $title=&mt('Changed [_1]',&standard_parameter_names($parmname));
+ my $parmitem = &standard_parameter_names($parmname);
+ $parmitem = &mt($parmitem);
+ my $title=&mt('Changed [_1]',$parmitem);
my $description=&mt('Changed [_1] for [_2] to [_3]',&standard_parameter_names($parmname),$realmdescription,
(&isdateparm($istype{$parmname})?&Apache::lonlocal::locallocaltime($value):$value));
if (($uname) && ($udom)) {