[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /interface lonparmset.pm

raeburn raeburn@source.lon-capa.org
Mon, 25 Jan 2010 21:58:31 -0000


raeburn		Mon Jan 25 21:58:31 2010 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/interface	lonparmset.pm 
  Log:
  - Backport 1.470, 1.471.
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.413.4.2 loncom/interface/lonparmset.pm:1.413.4.3
--- loncom/interface/lonparmset.pm:1.413.4.2	Thu May 21 15:46:27 2009
+++ loncom/interface/lonparmset.pm	Mon Jan 25 21:58:31 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.413.4.2 2009/05/21 15:46:27 raeburn Exp $
+# $Id: lonparmset.pm,v 1.413.4.3 2010/01/25 21:58:31 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1165,7 +1165,7 @@
                     $parmdis = $display;
                     $parmdis =~ s/\s*\[Part.*$//g;
                 } else {
-                    $parmdis = $display;
+                    $parmdis = &mt($display);
                 }
 		$$allparms{$name}=$parmdis;
 		if (ref($defkeytype)) {
@@ -2540,9 +2540,11 @@
 #
 # 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++;
@@ -2929,9 +2931,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'));
@@ -3772,7 +3775,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 {
@@ -3886,15 +3888,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);
@@ -3912,8 +3917,11 @@
 	    }
 	    $output .= '</td><td>';
 	    if ($stillactive) {
-		my $title=&mt('Changed [_1]',&standard_parameter_names($parmname));
-                my $description=&mt('Changed [_1] for [_2] to [_3]',&standard_parameter_names($parmname),$realmdescription,
+                my $parmitem = &standard_parameter_names($parmname);
+                $parmitem = &mt($parmitem);
+                my $title=&mt('Changed [_1]',$parmitem);
+                my $description=&mt('Changed [_1] for [_2] to [_3]',
+                                    $parmitem,$realmdescription,
 				    (&isdateparm($istype{$parmname})?&Apache::lonlocal::locallocaltime($value):$value));
 		if (($uname) && ($udom)) {
 		    $output .=