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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Tue, 07 Aug 2007 23:56:35 -0000


albertel		Tue Aug  7 19:56:35 2007 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  - BUG#5346 
      - if display is blank keep looking for a description from other resources
      - if no display is found at least printout the internal name
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.374 loncom/interface/lonparmset.pm:1.375
--- loncom/interface/lonparmset.pm:1.374	Mon Aug  6 22:02:01 2007
+++ loncom/interface/lonparmset.pm	Tue Aug  7 19:56:34 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.374 2007/08/07 02:02:01 albertel Exp $
+# $Id: lonparmset.pm,v 1.375 2007/08/07 23:56:34 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -944,7 +944,7 @@
 # allparms is a hash of parameter names
 #
 	    my $name=&Apache::lonnet::metadata($srcf,$key.'.name');
-	    if (!exists($$allparms{$name})) {
+	    if (!exists($$allparms{$name}) || $$allparms{$name} =~ m/^\s*$/ ) {
 		my $display= &Apache::lonnet::metadata($srcf,$key.'.display');
 		my $parmdis = $display;
 		$parmdis =~ s/\[Part.*$//g;
@@ -1081,7 +1081,9 @@
 	if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) {
 	    $r->print(' checked');
 	}
-	$r->print('>'.$$allparms{$tempkey}.'</label></td>');
+	$r->print('>'.($$allparms{$tempkey}=~/\S/ ? $$allparms{$tempkey}
+		                                  : $tempkey)
+		  .'</label></td>');
  	$cnt++;
         if ($cnt==3) {
 	    $r->print("</tr>\n<tr>");