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

bisitz lon-capa-cvs-allow@mail.lon-capa.org
Tue, 16 Sep 2008 13:10:20 -0000


bisitz		Tue Sep 16 09:10:20 2008 EDT

  Modified files:              
    /loncom/interface/statistics	lonstudentassessment.pm 
  Log:
  Replaced style for summary tables with LON-CAPA standard table styles
  
  
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.149 loncom/interface/statistics/lonstudentassessment.pm:1.150
--- loncom/interface/statistics/lonstudentassessment.pm:1.149	Tue Sep 16 04:49:08 2008
+++ loncom/interface/statistics/lonstudentassessment.pm	Tue Sep 16 09:10:19 2008
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstudentassessment.pm,v 1.149 2008/09/16 08:49:08 bisitz Exp $
+# $Id: lonstudentassessment.pm,v 1.150 2008/09/16 13:10:19 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -962,12 +962,12 @@
 
 sub StudentAverageTotal {
     my $Str = '<h3>'.&mt('Summary Tables').'</h3>'.$/;
-    $Str .= '<table border=2 cellspacing="1">'."\n";
-    $Str .= '<tr>'.
+    $Str .= &Apache::loncommon::start_data_table();
+    $Str .= &Apache::loncommon::start_data_table_header_row().
         '<th>'.&mt('Title').'</th>'.
         '<th>'.&mt('Average').'</th>'.
         '<th>'.&mt('Maximum').'</th>'.
-        '</tr>'.$/;
+        &Apache::loncommon::end_data_table_header_row().$/;
     foreach my $seq (@sequences) {
         my $symb = $seq->symb;
         my $ave;
@@ -981,11 +981,13 @@
         }
         my $max = $Statistics->{$symb}->{'max'};
         $ave = sprintf("%.2f",$ave);
-        $Str .= '<tr><td>'.$seq->compTitle.'</td>'.
+        $Str .= &Apache::loncommon::start_data_table_row().
+            '<td>'.$seq->compTitle.'</td>'.
             '<td align="right">'.$ave.'&nbsp;</td>'.
-            '<td align="right">'.$max.'&nbsp;'.'</td></tr>'."\n";
+            '<td align="right">'.$max.'&nbsp;'.'</td>'.
+            &Apache::loncommon::end_data_table_row()."\n";
     }
-    $Str .= "</table>\n";
+    $Str .= &Apache::loncommon::end_data_table()."\n";
     return $Str;
 }
 
@@ -996,31 +998,36 @@
                          $student->{'fullname'},
                          $student->{'username'},$student->{'domain'}).'</h3>';
     $Str .= $/;
-    $Str .= '<table border=2 cellspacing="1">'."\n";
+    $Str .= &Apache::loncommon::start_data_table()."\n";
     $Str .= 
-        '<tr>'.
+        &Apache::loncommon::start_data_table_header_row().
         '<th>'.&mt('Sequence or Folder').'</th>';
     if ($chosen_output->{'base'} eq 'tries') {
         $Str .= '<th>'.&mt('Parts Correct').'</th>';
     } else {
         $Str .= '<th>'.&mt('Score').'</th>';
     }
-    $Str .= '<th>'.&mt('Maximum').'</th>'."</tr>\n";
+    $Str .= '<th>'.&mt('Maximum').'</th>'.
+            &Apache::loncommon::end_data_table_header_row()."\n";
     my $total = 0;
     my $total_max = 0;
     foreach my $seq (@sequences) {
         my $value = $Statistics->{$seq->symb}->{'score'};
         my $max = $Statistics->{$seq->symb}->{'max'};
-        $Str .= '<tr><td>'.&HTML::Entities::encode($seq->compTitle).'</td>'.
+        $Str .= &Apache::loncommon::start_data_table_row().
+            '<td>'.&HTML::Entities::encode($seq->compTitle).'</td>'.
             '<td align="right">'.$value.'</td>'.
-                '<td align="right">'.$max.'</td></tr>'."\n";
+            '<td align="right">'.$max.'</td>'.
+            &Apache::loncommon::end_data_table_row()."\n";
         $total += $value;
         $total_max +=$max;
     }
-    $Str .= '<tr><td><b>'.&mt('Total').'</b></td>'.
+    $Str .= &Apache::loncommon::start_data_table_row().
+        '<td><b>'.&mt('Total').'</b></td>'.
         '<td align="right">'.$total.'</td>'.
-        '<td align="right">'.$total_max."</td></tr>\n";
-    $Str .= "</table>\n";
+        '<td align="right">'.$total_max.'</td>'.
+        &Apache::loncommon::end_data_table_row()."\n";
+    $Str .= &Apache::loncommon::end_data_table()."\n";
     return $Str;
 }