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

raeburn raeburn at source.lon-capa.org
Mon Apr 3 11:32:54 EDT 2023


raeburn		Mon Apr  3 15:32:54 2023 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  - Stop long parmeter names overflowing category box in "Select Parameters 
    to View" table row.
  - Requires Text::Wrap
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.616 loncom/interface/lonparmset.pm:1.617
--- loncom/interface/lonparmset.pm:1.616	Thu Jul  7 03:37:01 2022
+++ loncom/interface/lonparmset.pm	Mon Apr  3 15:32:54 2023
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.616 2022/07/07 03:37:01 raeburn Exp $
+# $Id: lonparmset.pm,v 1.617 2023/04/03 15:32:54 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -329,6 +329,7 @@
 use Apache::longroup;
 use Apache::lonrss;
 use HTML::Entities;
+use Text::Wrap();
 use LONCAPA qw(:DEFAULT :match);
 
 
@@ -2565,8 +2566,9 @@
             if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) {
                 $r->print( ' checked="checked"');
             }
-            $r->print(' />'.($$allparms{$tempkey}=~/\S/ ? $$allparms{$tempkey}
-                                                      : $tempkey)
+            $r->print(' />'.($$allparms{$tempkey}=~/\S/ ? 
+                             Text::Wrap::wrap('',' 'x4,$$allparms{$tempkey})
+                             : $tempkey)
                      .'</label></span><br />'."\n");
         }
         $r->print('</div>');




More information about the LON-CAPA-cvs mailing list