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

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Sat, 19 Jul 2008 02:28:45 -0000


raeburn		Fri Jul 18 22:28:45 2008 EDT

  Modified files:              
    /loncom/interface	domainprefs.pm 
  Log:
  - Set value of $colspan once only when creating data tables.
  
  
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.63 loncom/interface/domainprefs.pm:1.64
--- loncom/interface/domainprefs.pm:1.63	Sat Jul 12 20:00:50 2008
+++ loncom/interface/domainprefs.pm	Fri Jul 18 22:28:44 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.63 2008/07/13 00:00:50 raeburn Exp $
+# $Id: domainprefs.pm,v 1.64 2008/07/19 02:28:44 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -393,7 +393,10 @@
     if (($action eq 'autoupdate') || ($action eq 'rolecolors') || 
         ($action eq 'usercreation') || ($action eq 'usermodification') ||
         ($action eq 'coursecategories')) {
-        my $colspan = ($action eq 'rolecolors')?' colspan="2"':'';
+        my $colspan = '';
+        if (($action eq 'rolecolors') || ($action eq 'coursecategories')) {
+            $colspan = ' colspan="2"';
+        }
         $output .= '
           <tr>
            <td>
@@ -423,7 +426,6 @@
             <table class="LC_nested">
              <tr class="LC_info_row">
               <td class="LC_left_item"'.$colspan.'>'.&mt($item->{'header'}->[1]->{'col1'}).'</td>';
-        my $colspan = ($action eq 'coursecategories')?' colspan="2"':'';
         $output .= '
               <td class="LC_right_item"'.$colspan.'>'.&mt($item->{'header'}->[1]->{'col2'}).'</td>
              </tr>';