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

raeburn raeburn@source.lon-capa.org
Sun, 15 Feb 2009 15:14:35 -0000


raeburn		Sun Feb 15 15:14:35 2009 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  Bug 5889.
  - Avoid applying &mt() to user-supplied parameter descriptions by using the standard parameter name (if available) for the parameter, otherwise use the user-supplied description (not localized). 
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.430 loncom/interface/lonparmset.pm:1.431
--- loncom/interface/lonparmset.pm:1.430	Fri Feb 13 20:20:30 2009
+++ loncom/interface/lonparmset.pm	Sun Feb 15 15:14:34 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.430 2009/02/13 20:20:30 schafran Exp $
+# $Id: lonparmset.pm,v 1.431 2009/02/15 15:14:34 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1317,14 +1317,15 @@
 	if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) {
 	    $r->print(' checked="checked"');
 	}
-        my $displaykey;
-        if ($$allparms{$tempkey}=~/\S/) {
-            $displaykey = $$allparms{$tempkey};
-        } else {
-            $displaykey = $tempkey;
+        my $displaykey = &standard_parameter_names($tempkey);
+        if ($displaykey eq '') {
+            if ($$allparms{$tempkey}=~/\S/) {
+                $displaykey = $$allparms{$tempkey};
+            } else {
+                $displaykey = $tempkey;
+            }
         }
-        $displaykey =~ s/(\[|\])/~$1/g;
-        $r->print(' />'.&mt($displaykey).'</label></td>');
+        $r->print(' />'.$displaykey.'</label></td>');
  	$cnt++;
         if ($cnt==3) {
 	    $r->print("</tr>\n<tr>");