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

raeburn raeburn@source.lon-capa.org
Thu, 05 Nov 2009 14:48:39 -0000


raeburn		Thu Nov  5 14:48:39 2009 EDT

  Modified files:              
    /loncom/interface	courseprefs.pm 
  Log:
  - Replace use of datatable style with LC_nested_outer style in tables where user:domain are set:
   (a) for user-based blocking of discussion/chat
   (b) designation of recipients for feedback sent in course.
  - Keep help icon on same line as config item title.
  
  
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.9 loncom/interface/courseprefs.pm:1.10
--- loncom/interface/courseprefs.pm:1.9	Thu Oct 29 14:57:18 2009
+++ loncom/interface/courseprefs.pm	Thu Nov  5 14:48:39 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set configuration settings for a course
 #
-# $Id: courseprefs.pm,v 1.9 2009/10/29 14:57:18 raeburn Exp $
+# $Id: courseprefs.pm,v 1.10 2009/11/05 14:48:39 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1768,7 +1768,7 @@
     } else {
         my $num = 0;
         my @curr = split(/,/,$currvalue);
-        $output .= &Apache::loncommon::start_data_table();
+        $output .= '<table class="LC_nested_outer">';
         my ($currusers);
         foreach my $val (@curr) {
             next if ($val eq '');
@@ -1799,7 +1799,7 @@
             $num ++;
         }
         if ($num) {
-            $output .= &Apache::loncommon::start_data_table_row().
+            $output .= '<tr>'.
                        '<td align="left"><i>';
             if ($num > 1) {
                 $output .= $lt->{'currone'};
@@ -1808,15 +1808,14 @@
             }
             $output .= '</i><br />'.
                           '<table>'.$currusers.'</table></td>'.
-                          &Apache::loncommon::end_data_table_row();
+                          '</tr>';
         }
-        $output .= &Apache::loncommon::start_data_table_row().
+        $output .= '<tr>'.
                   '<td align="left"><span class="LC_nobreak"><i>'.
                   $lt->{'add'}.'</i></span><br />'.
                   &select_recipient($item,$num,$cdom,$sections).
                   '<input type="hidden" name="'.$item.'_total" value="'.$num.'" />'.
-                  '</td>'.&Apache::loncommon::end_data_table_row().
-                  &Apache::loncommon::end_data_table();
+                  '</td></tr></table>';
     }
     return $output;
 }
@@ -1827,9 +1826,8 @@
     my $selectlink =
         &Apache::loncommon::selectstudent_link('display',$item.'_uname_'.$num,
                                                $item.'_udom_'.$num,1);
-    my $css_class = ($num % 2)?'LC_even_row':'LC_odd_row';
     my $output = 
-        '<table><tr class="'.$css_class.'"><td align="center">'.&mt('Username').'<br />'.
+        '<table><tr><td align="center">'.&mt('Username').'<br />'.
         '<input type="text" name="'.$item.'_uname_'.$num.'" value="" /></td>'.
         '<td align="center">'.&mt('Domain').'<br />'.$domform.'</td>';
     if (ref($sections) eq 'ARRAY') {
@@ -1883,8 +1881,8 @@
     }
     my %items = (
         'plc.roles.denied' => {
-                   text => '<b>'.&mt($itemtext->{'plc.roles.denied'}).'</b>'.
-                           &Apache::loncommon::help_open_topic("Course_Disable_Discussion").
+                   text => '<span class="LC_nobreak"><b>'.&mt($itemtext->{'plc.roles.denied'}).'</b>'.
+                           &Apache::loncommon::help_open_topic("Course_Disable_Discussion").'</span><br />'.
                            &mt('(role-based)'),
                    input => 'checkbox',
                  },
@@ -1896,8 +1894,8 @@
                  },
 
         'pch.roles.denied'   => {
-                   text => '<b>'.&mt($itemtext->{'pch.roles.denied'}).'</b>'.
-                           &Apache::loncommon::help_open_topic("Course_Disable_Discussion").'<br />'.
+                   text => '<span class="LC_nobreak"><b>'.&mt($itemtext->{'pch.roles.denied'}).'</b>'.
+                           &Apache::loncommon::help_open_topic("Course_Disable_Discussion").'</span><br />'.
                            &mt('(role-based)'),
                    input => 'checkbox',
                  },
@@ -2678,11 +2676,11 @@
 </script>
 
 ENDJS
-    $output .= $currstr.&Apache::loncommon::start_data_table();
+    $output .= $currstr.'<table class="LC_nested_outer">';
     if (@curr > 0) {
         for (my $i=0; $i<@curr; $i++) {
             my $pos = $i+1;
-            $output .= &Apache::loncommon::start_data_table_row().
+            $output .= '<tr>'.
                        '<td align="left"><span class="LC_nobreak">'.
                        &position_selector($pos,$i,$maxnum).&mt('Delete:').
                        '<input type="checkbox" name="printfmthdr_del_'.$i.
@@ -2696,19 +2694,19 @@
                            '<input type="textbox" name="printfmthdr_text_'.$i.'"'.
                            ' value="'.$curr[$i].'" size="25" /></td>';
             }
-            $output .= &Apache::loncommon::end_data_table_row();
+            $output .= '</tr>';
         }
     }
     my $pos = $currnum+1; 
-    $output .= &Apache::loncommon::start_data_table_row().
+    $output .= '<tr>'.
                '<td align="left"><span class="LC_nobreak">'.
                &position_selector($pos,$currnum,$maxnum).
                '<b>'.&mt('New').'</b></span></td><td align="left">'.
                &substitution_selector($currnum).'</td>'.
-               &Apache::loncommon::end_data_table_row();
+               '</tr>'; 
     $pos ++;
     $currnum ++;
-    $output .= &Apache::loncommon::start_data_table_row().
+    $output .= '<tr>'.
                '<td align="left"><span class="LC_nobreak">'.
                &position_selector($pos,$currnum,$maxnum).
                '<b>'.&mt('New').'</b></span></td>'.
@@ -2717,8 +2715,8 @@
                '" value="" size ="25" />'.
                '<input type="hidden" name="printfmthdr_maxnum" value="'.
                 $maxnum.'" /></td>'.
-               &Apache::loncommon::end_data_table_row().
-               &Apache::loncommon::end_data_table(); 
+               '</tr>'.
+               '</table>'; 
     return $output;
 }