[LON-CAPA-cvs] cvs: loncom /interface/statistics loncorrectproblemplot.pm lonproblemanalysis.pm lonproblemstatistics.pm lonstathelpers.pm lonstudentsubmissions.pm lonsubmissiontimeanalysis.pm lonsurveyreports.pm

bisitz lon-capa-cvs-allow@mail.lon-capa.org
Thu, 30 Oct 2008 17:45:26 -0000


This is a MIME encoded message

--bisitz1225388726
Content-Type: text/plain

bisitz		Thu Oct 30 17:45:26 2008 EDT

  Modified files:              
    /loncom/interface/statistics	loncorrectproblemplot.pm 
                                	lonproblemanalysis.pm 
                                	lonproblemstatistics.pm 
                                	lonstathelpers.pm 
                                	lonstudentsubmissions.pm 
                                	lonsubmissiontimeanalysis.pm 
                                	lonsurveyreports.pm 
  Log:
  Optimized option selection tables for statistics:
  - Use LON-CAPA standard tables
  - Added missing &mt() calls
  - XHTML conform "checked" and "selected" usage
  - Added info/warning/error style to info/warning/error messages
  - Added text "Options" to headline of options column
  - Added horizontal line before and after problem output for better separation of problem content and rest of screen
  
  Additional changes:
  lonproblemanalysis.pm:
      - Now uses LON-CAPA standard table for foil value table
      - Moved status bar from inside the options table to under it
  lonproblemstatistics.pm:
      - Moved Graph option from under the table to inside option table
  lonstudentsubmissions.pm:
      - Moved output_selector from headline to extra column inside option table
  
  
  
--bisitz1225388726
Content-Type: text/plain
Content-Disposition: attachment; filename="bisitz-20081030174526.txt"

Index: loncom/interface/statistics/loncorrectproblemplot.pm
diff -u loncom/interface/statistics/loncorrectproblemplot.pm:1.23 loncom/interface/statistics/loncorrectproblemplot.pm:1.24
--- loncom/interface/statistics/loncorrectproblemplot.pm:1.23	Thu Oct 23 09:07:51 2008
+++ loncom/interface/statistics/loncorrectproblemplot.pm	Thu Oct 30 17:45:25 2008
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncorrectproblemplot.pm,v 1.23 2008/10/23 09:07:51 bisitz Exp $
+# $Id: loncorrectproblemplot.pm,v 1.24 2008/10/30 17:45:25 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -293,32 +293,37 @@
     $Str .= &Apache::lonhtmlcommon::breadcrumbs('Correct Problems Plot');
     $Str .= '<p>';
     #
-    $Str .= '<table cellspacing="5">'."\n";
-    $Str .= '<tr>';
-    $Str .= '<td align="center"><b>'.&mt('Sections').'</b></td>';
-    $Str .= '<td align="center"><b>'.&mt('Groups').'</b></td>';
-    $Str .= '<td align="center"><b>'.&mt('Access Status').'</b></td>';
-    $Str .= '<td align="center"><b>'.&mt('Sequences and Folders').'</b></td>';
-    $Str .= '<td rowspan="2">'.
-        &Apache::lonstathelpers::limit_by_time_form().'</td>';
-    $Str .= '</tr>'."\n";
+    $Str .= &Apache::loncommon::start_data_table();
+    $Str .= &Apache::loncommon::start_data_table_header_row();
+    $Str .= '<th>'.&mt('Sections').'</th>';
+    $Str .= '<th>'.&mt('Groups').'</th>';
+    $Str .= '<th>'.&mt('Access Status').'</th>';
+    $Str .= '<th>'.&mt('Sequences and Folders').'</th>';
+    $Str .= '<th>'.&mt('Time Period').'</th>';
+    $Str .= &Apache::loncommon::end_data_table_header_row();
     #
-    $Str .= '<tr><td align="center">'."\n";
+    $Str .= &Apache::loncommon::start_data_table_row();
+    $Str .= '<td align="center" valign="top">'."\n";
     $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5);
     $Str .= '</td>';
     #
-    $Str .= '<td align="center">'."\n";
+    $Str .= '<td align="center" valign="top">'."\n";
     $Str .= &Apache::lonstatistics::GroupSelect('Group','multiple',5);
     $Str .= '</td>';
-    $Str .= '<td align="center">';
+    $Str .= '<td align="center" valign="top">';
     $Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5);
-    $Str .= '</td><td>'."\n";
+    $Str .= '</td>'."\n";
     #
+    $Str .= '<td align="center" valign="top">'."\n";
     $Str .= &Apache::lonstatistics::map_select('Maps','multiple,all',5);
     $Str .= '</td>';
     #
-    $Str .= '</tr>'."\n";
-    $Str .= '</table>'."\n";
+    $Str .= '<td align="center" valign="top">'."\n";
+    $Str .= &Apache::lonstathelpers::limit_by_time_form();
+    $Str .= '</td>';
+    #
+    $Str .= &Apache::loncommon::end_data_table_row();
+    $Str .= &Apache::loncommon::end_data_table();
     #
     $Str .= '<p><span class="LC_nobreak">'
            .&mt('Status: [_1]',
Index: loncom/interface/statistics/lonproblemanalysis.pm
diff -u loncom/interface/statistics/lonproblemanalysis.pm:1.131 loncom/interface/statistics/lonproblemanalysis.pm:1.132
--- loncom/interface/statistics/lonproblemanalysis.pm:1.131	Thu Oct 23 09:07:51 2008
+++ loncom/interface/statistics/lonproblemanalysis.pm	Thu Oct 30 17:45:25 2008
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonproblemanalysis.pm,v 1.131 2008/10/23 09:07:51 bisitz Exp $
+# $Id: lonproblemanalysis.pm,v 1.132 2008/10/30 17:45:25 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -78,7 +78,10 @@
     my @Students = @Apache::lonstatistics::Students;
     #
     if (@Students < 1 && exists($env{'form.firstrun'})) {
-        $r->print('<h2>There are no students in the sections/groups selected</h2>');
+        $r->print('<div class="LC_warning">'
+                 .&mt('There are no students in the sections/groups selected.')
+                 .'</div>'
+        );
     }
     #
     my @CacheButtonHTML = 
@@ -141,7 +144,10 @@
             $r->print('<h3>'.$resource->src.'</h3>');
             $r->print('<h4>'.&Apache::lonstatistics::section_and_enrollment_description().'</h4>');
             if ($env{'form.show_prob'} eq 'true') {
-                $r->print(&Apache::lonstathelpers::render_resource($resource));
+                $r->print('<hr />'
+                         .&Apache::lonstathelpers::render_resource($resource)
+                         .'<hr />'
+                );
             }
             $r->rflush();
 	    if (@Students) {
@@ -162,7 +168,11 @@
 		    &numerical_response_analysis($r,$current_problem,
 						 $problem_data,\@Students);
 		} else {
-		    $r->print('<h2>Analysis of '.$current_problem->{'resptype'}.' is not supported</h2>');
+		    $r->print('<div class="LC_warning">'
+                             .&mt('Analysis of [_1] is not supported.'
+                                 ,$current_problem->{'resptype'})
+                             .'</div>'
+                    );
 		}
 	    }
         }
@@ -214,9 +224,10 @@
     }
     #
     if (ref($response_data) ne 'ARRAY') {
-        $r->print('<h2>'.
-                  &mt('There is no submission data for this resource').
-                  '</h2>');
+        $r->print('<div class="LC_warning">'
+                 .&mt('There is no submission data for this resource.')
+                 .'</div>'
+        );
         return;
     }
     my $analysis_html = '<table>';
@@ -233,7 +244,7 @@
             $stats_message = 
                 '[_1] submissions, [_2] correct, [_3] incorrect';
             $post_message = '';
-            $no_data_message = 'No data exists for attempt [_1]';
+            $no_data_message = 'No data exists for attempt [_1].';
         } else {
             my $starttime = &Apache::lonhtmlcommon::get_date_from_form
                 ('startdate_'.$plot_num);
@@ -281,9 +292,9 @@
                                           $restriction_function);
         if ($stats->{'submission_count'} == 0) {
             $analysis_html.= 
-                '<tr><td colspan="2"><font size="+1"><b>'.
+                '<tr><td colspan="2"><div class="LC_warning">'.
                 &mt($no_data_message,$plot_num,@extra_data).
-                '</b></font></td></tr>';
+                '</div></td></tr>';
         } else {
             $analysis_html.= 
                 '<tr><td colspan="2" align="center"><font size="+1"><b>'.
@@ -830,9 +841,9 @@
     }
     #
     if (! defined($response_data) || ref($response_data) ne 'ARRAY' ) {
-        $analysis_html = '<h2>'.
-            &mt('There is no submission data for this resource').
-            '</h2>';
+        $analysis_html = '<div class="LC_warning">'
+                        .&mt('There is no submission data for this resource.')
+                        .'</div>';
         $r->print($analysis_html);
         return;
     }
@@ -863,7 +874,9 @@
                  &get_time_from_row($response_data->[-1]),
                  $plot_num);
             $pre_graph_text = 
-                'Data from [_6] to [_7]<br /> [_2] submissions from [_5] students, [_3] correct, [_4] incorrect';
+                'Data from [_6] to [_7]'
+               .'<br />'
+               .'[_2] submissions from [_5] students, [_3] correct, [_4] incorrect';
             $extra_data[0] = &Apache::lonlocal::locallocaltime($starttime);
             $extra_data[1] = &Apache::lonlocal::locallocaltime($endtime);
             #
@@ -951,11 +964,13 @@
             }
         } elsif ($no_data_text ne '') {
             $analysis_html.='<tr><td colspan="4" align="center">'.
+                '<div class="LC_warning">'.
                 &mt($no_data_text,
                     $plot_num,$foil_choice_data->{'_count'},
                     $correct,                    
                     $foil_choice_data->{'_count'}-$correct,
-                    @extra_data);
+                    @extra_data).
+                '</div>';
             if (defined($post_graph_text)) {
                 $analysis_html.='<br />'.$post_graph_text;
             }
@@ -1217,9 +1232,10 @@
          $resource->symb,$respid);
     if (! defined($PerformanceData) || 
         ref($PerformanceData) ne 'ARRAY' ) {
-        $r->print('<h2>'.
-                  &mt('There is no student data for this problem.').
-                  '</h2>');
+        $r->print('<div class="LC_warning">'
+                 .&mt('There is no student data for this problem.')
+                 .'</div>'
+        );
     }  else {
         $r->rflush();
         if ($env{'form.AnalyzeOver'} eq 'tries') {
@@ -1234,10 +1250,10 @@
             $r->print($analysis_html);
             $r->rflush();
         } else {
-            $r->print('<h2>'.
-                      &mt('The analysis you have selected is '.
-                          'not supported at this time').
-                      '</h2>');
+            $r->print('div class="LC_warning"'
+                     .&mt('The analysis you have selected is not supported at this time.')
+                     .'</div>'
+            );
         }
     }
 }
@@ -1314,12 +1330,18 @@
         if (! defined($response_data{'_total'}->[$try]) ||
             $response_data{'_total'}->[$try] == 0) { 
             if ($try > 1) {
-                $analysis_html.= '<tr><td align="center" colspan="4"><b>'.
-                    &mt('None of the selected students attempted the problem more than [_1] times.',$try-1).
-                    '</b></td></tr>';
+                $analysis_html.= '<tr><td colspan="4">'
+                                .'<div class="LC_info">'
+                                .&mt('None of the selected students attempted the problem more than [_1] times.'
+                                    ,$try-1)
+                                .'</div>'
+                                .'</td></tr>';
             } else {
-                $analysis_html.= '<tr><td colspan="4" align="center"><b>'.
-                    &mt('None of the selected students have attempted the problem').'</b></td></tr>';
+                $analysis_html.= '<tr><td colspan="4">'
+                                .'<div class="LC_info">'
+                                .&mt('None of the selected students have attempted the problem.')
+                                .'</div>'
+                                .'</td></tr>';
             }
             last;
         }
@@ -1547,7 +1569,11 @@
     my ($processed_time_data,$correct,$data_count,$student_count,
         $ORdata,$Foils,$Concepts) = @_;
     if ($data_count <= 0) {
-        return ('<h2>'.&mt('There is no data to plot').'</h2>','');
+        return ('<div class="LC_warning">'
+               .&mt('There is no data to plot.')
+               .'</div>'
+               ,''
+        );
     }
     my $analysis_html;
     my @plotdata;
@@ -1723,23 +1749,23 @@
     }
     #
     # Build up the table of row labels.
-    my $table = '<table border="1" >'."\n";
+    my $table = &Apache::loncommon::start_data_table();
     if (@Concepts > 1) {
-        $table .= '<tr>'.
+        $table .= &Apache::loncommon::start_data_table_header_row().
             '<th>'.&mt('Concept Number').'</th>'.
             '<th>'.&mt('Concept').'</th>'.
             '<th>'.&mt('Foil Number').'</th>'.
             '<th>'.&mt('Foil Name').'</th>'.
             '<th>'.&mt('Foil Text').'</th>'.
             '<th>'.&mt('Correct Value').'</th>'.
-            "</tr>\n";
+            &Apache::loncommon::end_data_table_header_row();
     } else {
-        $table .= '<tr>'.
+        $table .= &Apache::loncommon::start_data_table_header_row().
             '<th>'.&mt('Foil Number').'</th>'.
             '<th>'.&mt('Foil Name').'</th>'.
             '<th>'.&mt('Foil Text').'</th>'.
             '<th>'.&mt('Correct Value').'</th>'.
-            "</tr>\n";
+            &Apache::loncommon::end_data_table_header_row();
     }        
     my $conceptindex = 1;
     my $foilindex = 1;
@@ -1747,39 +1773,39 @@
         my @FoilsInConcept = @{$concept->{'foils'}};
         my $firstfoil = shift(@FoilsInConcept);
         if (@Concepts > 1) {
-            $table .= '<tr>'.
+            $table .= &Apache::loncommon::start_data_table_row().
                 '<td>'.$conceptindex.'</td>'.
                 '<td>'.&HTML::Entities::encode($concept->{'name'},'<>&"').'</td>'.
                 '<td>'.$foilindex++.'</td>'.
                 '<td>'.&HTML::Entities::encode($Foildata{$firstfoil}->{'name'},'<>&"').'</td>'.
                 '<td>'.$Foildata{$firstfoil}->{'text'}.'</td>'.
                 '<td>'.&HTML::Entities::encode($Foildata{$firstfoil}->{'value'},'<>&"').'</td>'.
-                "</tr>\n";
+                &Apache::loncommon::end_data_table_row();
         } else {
-            $table .= '<tr>'.
+            $table .= &Apache::loncommon::start_data_table_row().
                 '<td>'.$foilindex++.'</td>'.
                 '<td>'.&HTML::Entities::encode($Foildata{$firstfoil}->{'name'},'<>&"').'</td>'.
                 '<td>'.$Foildata{$firstfoil}->{'text'}.'</td>'.
                 '<td>'.&HTML::Entities::encode($Foildata{$firstfoil}->{'value'},'<>&"').'</td>'.
-                "</tr>\n";
+                &Apache::loncommon::end_data_table_row();
         }
         foreach my $foilid (@FoilsInConcept) {
             if (@Concepts > 1) {
-                $table .= '<tr>'.
+                $table .= &Apache::loncommon::start_data_table_row().
                     '<td></td>'.
                     '<td></td>'.
                     '<td>'.$foilindex.'</td>'.
                     '<td>'.&HTML::Entities::encode($Foildata{$foilid}->{'name'},'<>&"').'</td>'.
                     '<td>'.$Foildata{$foilid}->{'text'}.'</td>'.
                     '<td>'.&HTML::Entities::encode($Foildata{$foilid}->{'value'},'<>&"').'</td>'.
-                    "</tr>\n";
+                    &Apache::loncommon::end_data_table_row();
             } else {
-                $table .= '<tr>'.
+                $table .= &Apache::loncommon::start_data_table_row().
                     '<td>'.$foilindex.'</td>'.
                     '<td>'.&HTML::Entities::encode($Foildata{$foilid}->{'name'},'<>&"').'</td>'.
                     '<td>'.$Foildata{$foilid}->{'text'}.'</td>'.
                     '<td>'.&HTML::Entities::encode($Foildata{$foilid}->{'value'},'<>&"').'</td>'.
-                    "</tr>\n";
+                    &Apache::loncommon::end_data_table_row();
             }                
         } continue {
             $foilindex++;
@@ -1787,7 +1813,7 @@
     } continue {
         $conceptindex++;
     }
-    $table .= "</table>\n";
+    $table .= &Apache::loncommon::end_data_table();
     #
     # Build option index with color stuff
     return ($table,\@Foils,\@Concepts);
@@ -1850,16 +1876,18 @@
     ## Build the menu
     my $Str = '';
     $Str .= &Apache::lonhtmlcommon::breadcrumbs('Detailed Problem Analysis');
-    $Str .= '<table cellspacing="5">'."\n";
-    $Str .= '<tr>';
-    $Str .= '<td align="center"><b>'.&mt('Sections').'</b></td>';
-    $Str .= '<td align="center"><b>'.&mt('Groups').'</b></td>';
-    $Str .= '<td align="center"><b>'.&mt('Access Status').'</b></td>';
-    $Str .= '<td align="center">&nbsp;</td>';
-    $Str .= '</tr>'."\n";
+    $Str .= '<p>';
+    $Str .= &Apache::loncommon::start_data_table();
+    $Str .= &Apache::loncommon::start_data_table_header_row();
+    $Str .= '<th>'.&mt('Sections').'</th>';
+    $Str .= '<th>'.&mt('Groups').'</th>';
+    $Str .= '<th>'.&mt('Access Status').'</th>';
+    $Str .= '<th>'.&mt('Options').'</th>';
+    $Str .= &Apache::loncommon::end_data_table_header_row();
     ##
     ## 
-    $Str .= '<tr><td align="center">'."\n";
+    $Str .= &Apache::loncommon::start_data_table_row();
+    $Str .= '<td align="center">'."\n";
     $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5);
     $Str .= '</td>';
     #
@@ -1873,12 +1901,12 @@
     #
     ##
     ##
-    $Str .= '<td>';
+    $Str .= '<td align="right" valign="top">';
     ##
     my $showprob_checkbox = 
         '<input type="checkbox" name="show_prob" value="true" ';
     if ($env{'form.show_prob'} eq 'true') {
-        $showprob_checkbox .= 'checked ';
+        $showprob_checkbox .= 'checked="checked" ';
     }
     $showprob_checkbox.= ' />';
     $Str.= '<nobr><label>'.
@@ -1890,7 +1918,7 @@
     if (! exists($env{'form.AnalyzeOver'}) || 
         $env{'form.AnalyzeOver'} eq 'tries'){
         # Default to tries
-        $analyze_selector .= ' selected ';
+        $analyze_selector .= ' selected="selected" ';
     }
     $analyze_selector .= '>'.&mt('Tries').'</option>';
     $analyze_selector .= '<option value="time" ';
@@ -1911,23 +1939,24 @@
     }
     foreach my $i (1,2,3,4,5,6,7,8,10,15,20) {
         $numplots_selector .= '<option value="'.$i.'" ';
-        if ($env{'form.NumPlots'} == $i) { $numplots_selector.=' selected '; }
+        if ($env{'form.NumPlots'} == $i) { $numplots_selector.=' selected="selected" '; }
         $numplots_selector .= '>'.$i.'</option>';
     }
     $numplots_selector .= '</select></nobr><br />';
     $Str .= '<nobr><label>'.&mt('Number of Plots [_1]',$numplots_selector).
         '</label></nobr>';
     ##
-    $Str .= '<span class="LC_nobreak"><label>'
-           .&mt('Status: [_1]',
-                    '<input type="text" name="stats_status"'
-                   .' size="60" value="" readonly="readonly" />')
-           .'</label></span>';
     $Str .= '</td>';
     ##
     ##
-    $Str .= '</tr>'."\n";
-    $Str .= '</table>'."\n";
+    $Str .= &Apache::loncommon::end_data_table_row();
+    $Str .= &Apache::loncommon::end_data_table();
+    $Str .= '<p class="LC_nobreak"><label>'
+           .&mt('Status: [_1]',
+                    '<input type="text" name="stats_status"'
+                   .' size="60" value="" readonly="readonly" />')
+           .'</label></p>';
+    $Str .= '</p>';
     return $Str;
 }
 
Index: loncom/interface/statistics/lonproblemstatistics.pm
diff -u loncom/interface/statistics/lonproblemstatistics.pm:1.114 loncom/interface/statistics/lonproblemstatistics.pm:1.115
--- loncom/interface/statistics/lonproblemstatistics.pm:1.114	Thu Oct 23 09:07:51 2008
+++ loncom/interface/statistics/lonproblemstatistics.pm	Thu Oct 30 17:45:25 2008
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonproblemstatistics.pm,v 1.114 2008/10/23 09:07:51 bisitz Exp $
+# $Id: lonproblemstatistics.pm,v 1.115 2008/10/30 17:45:25 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -612,29 +612,38 @@
     my $Str = '';
     $Str .= &Apache::lonhtmlcommon::breadcrumbs('Overall Problem Statistics',
 						'Statistics_Overall_Key');
-    $Str .= '<table cellspacing="5">'."\n";
-    $Str .= '<tr>';
-    $Str .= '<td align="center"><b>'.&mt('Sections').'</b></td>';
-    $Str .= '<td align="center"><b>'.&mt('Groups').'</b></td>';
-    $Str .= '<td align="center"><b>'.&mt('Access Status').'</b></td>';
-    $Str .= '<td align="center"><b>'.&mt('Sequences and Folders').'</b></td>';
-    $Str .= '<td align="center"><b>'.&mt('Statistics').'</b></td>';
-    $Str .= '<td rowspan="2">'.
-        &Apache::lonstathelpers::limit_by_time_form().'</td>';
-    $Str .= '</tr>'."\n";
+    $Str .= '<p>';
+    $Str .= &Apache::loncommon::start_data_table();
+    $Str .= &Apache::loncommon::start_data_table_header_row();
+    $Str .= '<th>'.&mt('Sections').'</th>';
+    $Str .= '<th>'.&mt('Groups').'</th>';
+    $Str .= '<th>'.&mt('Access Status').'</th>';
+    $Str .= '<th>'.&mt('Sequences and Folders').'</th>';
+    $Str .= '<th>'.&mt('Statistics').'</th>';
+    $Str .= '<th>'.&mt('Plot Graph').'</th>';
+    $Str .= '<th>'.&mt('Time Period').'</th>';
+    $Str .= &Apache::loncommon::end_data_table_header_row();
     #
-    $Str .= '<tr><td align="center">'."\n";
+    $Str .= &Apache::loncommon::start_data_table_row();
+    $Str .= '<td align="center" valign="top">'."\n";
     $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5);
-    $Str .= '</td><td align="center">';
+    $Str .= '</td><td align="center" valign="top">';
     $Str .= &Apache::lonstatistics::GroupSelect('Group','multiple',5);
-    $Str .= '</td><td align="center">';
+    $Str .= '</td><td align="center" valign="top">';
     $Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5);
-    $Str .= '</td><td align="center">';
+    $Str .= '</td><td align="center" valign="top">';
     #
     $Str .= &Apache::lonstatistics::map_select('Maps','multiple,all',5);
-    $Str .= '</td><td>'.&field_selection_input();
-    $Str .= '</td></tr>'."\n";
-    $Str .= '</table>'."\n";
+    $Str .= '</td><td align="center" valign="top">';
+    $Str .= &field_selection_input();
+    $Str .= '</td><td align="center" valign="top">';
+    $Str .= &plot_dropdown();
+    $Str .= '</td>'."\n";
+    $Str .= '</td><td align="center" valign="top">';
+    $Str .= &Apache::lonstathelpers::limit_by_time_form();
+    $Str .= '</td>'."\n";
+    $Str .=  &Apache::loncommon::end_data_table_row();
+    $Str .= &Apache::loncommon::end_data_table();
     #
     $Str .= '<p><span class="LC_nobreak">'
            .&mt('Status: [_1]',
@@ -642,10 +651,10 @@
                    .' size="60" value="" readonly="readonly" />')
            .'</span></p>';
     #
+    $Str .= '</p>';
     $Str .= '<input type="submit" name="GenerateStatistics" value="'.
         &mt('Generate Statistics').'" />';
-    $Str .= '&nbsp;'x5;
-    $Str .= 'Plot '.&plot_dropdown().('&nbsp;'x10);
+    $Str .= ('&nbsp;'x10);
     #
     return $Str;
 }
@@ -728,7 +737,7 @@
     ($navmap,@sequences) = 
         &Apache::lonstatistics::selected_sequences_with_assessments();
     if (! ref($navmap)) {
-        $r->print('<h1>'.&mt('A course-wide error occurred.').'</h1>'.
+        $r->print('<div class="LC_error">'.&mt('A course-wide error occurred.').'</div>'.
                   '<h3>'.$navmap.'</h3>');
 	&clean_up();
         return;
Index: loncom/interface/statistics/lonstathelpers.pm
diff -u loncom/interface/statistics/lonstathelpers.pm:1.55 loncom/interface/statistics/lonstathelpers.pm:1.56
--- loncom/interface/statistics/lonstathelpers.pm:1.55	Sun Sep 14 15:16:29 2008
+++ loncom/interface/statistics/lonstathelpers.pm	Thu Oct 30 17:45:25 2008
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstathelpers.pm,v 1.55 2008/09/14 15:16:29 raeburn Exp $
+# $Id: lonstathelpers.pm,v 1.56 2008/10/30 17:45:25 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -158,7 +158,7 @@
                                                      resptype=>$resptype});
                         my $checked = '';
                         if ($env{'form.problemchoice'} eq $value) {
-                            $checked = 'checked ';
+                            $checked = 'checked="checked" ';
                         }
                         my $title = $res->compTitle;
                         if (! defined($title) || $title eq '') {
@@ -173,7 +173,7 @@
                         }
                         my $link = $res->link.'?symb='.&escape($res->shown_symb);
                         $seq_str .= ('&nbsp;'x2).
-                            qq{<a target="preview" href="$link">view</a>};
+                            '<a target="preview" href="'.$link.'">'.&mt('view').'</a>';
                         $seq_str .= "</td></tr>\n";
                         $rb_count++;
                     }
@@ -229,8 +229,9 @@
     if (! defined($navmap)) {
         $navmap = Apache::lonnavmaps::navmap->new();
         if (! defined($navmap)) {
-            $Str .= 
-                '<h1>'.&mt('Error: cannot process course structure').'</h1>';
+            $Str .= '<div class="LC_error">'
+                   .&mt('Error: cannot process course structure')
+                   .'</div>';
             return $Str;
         }
     }
@@ -321,7 +322,7 @@
                 $target.='<tr><td><label>'.
                     '<input type="checkbox" name="'.$inputname.'" ';
                 if ($checked) {
-                    $target .= 'checked ';
+                    $target .= 'checked="checked" ';
                 }
                 $target .= 'id="'.$seq_id.':'.$item_id++.'" ';
                 $target.= 
@@ -329,7 +330,7 @@
                     '&nbsp;'.$res->compTitle.'</label>'.
                     ('&nbsp;'x2).'<a target="preview" '.
                     'href="'.$res->link.'?symb='.
-                    &escape($res->shown_symb).'">view</a>'.
+                    &escape($res->shown_symb).'">'.&mt('view').'</a>'.
                     '</td></tr>'.$/;
             } else { 
                 if (defined($target)) {
Index: loncom/interface/statistics/lonstudentsubmissions.pm
diff -u loncom/interface/statistics/lonstudentsubmissions.pm:1.49 loncom/interface/statistics/lonstudentsubmissions.pm:1.50
--- loncom/interface/statistics/lonstudentsubmissions.pm:1.49	Thu Oct 23 09:07:51 2008
+++ loncom/interface/statistics/lonstudentsubmissions.pm	Thu Oct 30 17:45:25 2008
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstudentsubmissions.pm,v 1.49 2008/10/23 09:07:51 bisitz Exp $
+# $Id: lonstudentsubmissions.pm,v 1.50 2008/10/30 17:45:25 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -66,12 +66,14 @@
     my @Students = @Apache::lonstatistics::Students;
     #
     if (@Students < 1) {
-        $r->print('<h2>There are no students in the sections selected</h2>');
+        $r->print('<div class="LC_warning">'
+                 .&mt('There are no students in the sections selected.')
+                 .'</div>');
     }
     #
     my @CacheButtonHTML = 
         &Apache::lonstathelpers::manage_caches($r,'Statistics','stats_status',
-                                   '<h3>'.&mt('Loading student data').'</h3>');
+                                   '<div class="LC_info">'.&mt('Loading student data...').'</div>');
     $r->rflush();
     #
     if (exists($env{'form.problemchoice'}) && 
@@ -103,7 +105,7 @@
         # Get resource objects
         my $navmap = Apache::lonnavmaps::navmap->new();
         if (!defined($navmap)) {
-            $r->print('<h1>'.&mt("Internal error").'</h1>');
+            $r->print('<div class="LC_error">'.&mt("Internal error").'</div>');
             return;
         }
         my %already_seen;
@@ -145,7 +147,7 @@
                   &mt('Computing correct answers greatly increasese the amount of time required to prepare a report.').
                   '</p>');
         $r->print('<p>'.
-                  &mt('please select problems and use the <b>Prepare Report</b> button to continue.').
+                  &mt('Please select problems and use the [_1]Prepare Report[_2] button to continue.','<b>','</b>').
                   '</p>');
         $r->print(&Apache::lonstathelpers::MultipleProblemSelector
                   (undef,'problemchoice','Statistics'));
@@ -928,9 +930,11 @@
             time.'_'.rand(1000000000).'.csv';
     unless ($outputfile = Apache::File->new('>/home/httpd'.$filename)) {
         $r->log_error("Couldn't open $filename for output $!");
-        $r->print(&mt('Problems occurred in writing the CSV file. '
+        $r->print('<div class="LC_error">'
+                 .&mt('Problems occurred in writing the CSV file. '
                      .'This error has been logged. '
-                     .'Please alert your LON-CAPA administrator.'));
+                     .'Please alert your LON-CAPA administrator.')
+                 .'</div>');
         $outputfile = undef;
     }
     #
@@ -1086,15 +1090,18 @@
     my $Str = '';
     $Str .= &Apache::lonhtmlcommon::breadcrumbs('Student Submission Reports');
     $Str .= '<p>';
-    $Str .= '<table cellspacing="5">'."\n";
-    $Str .= '<tr>';
+    $Str .= &Apache::loncommon::start_data_table();
+    $Str .= &Apache::loncommon::start_data_table_header_row();
     $Str .= '<th>'.&mt('Sections').'</th>';
     $Str .= '<th>'.&mt('Groups').'</th>';
     $Str .= '<th>'.&mt('Access Status').'</th>';
-    $Str .= '<th>'.&mt('Output as [_1]',$output_selector).'</th>';
-    $Str .= '</tr>'."\n";
+#    $Str .= '<th>'.&mt('Output as [_1]',$output_selector).'</th>';
+    $Str .= '<th>'.&mt('Options').'</th>';
+    $Str .= '<th>'.&mt('Output Format').'</th>';
+    $Str .= &Apache::loncommon::end_data_table_header_row();
     #
-    $Str .= '<tr><td align="center">'."\n";
+    $Str .= &Apache::loncommon::start_data_table_row();
+    $Str .= '<td align="center">'."\n";
     $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5);
     $Str .= '</td>';
     #
@@ -1109,14 +1116,14 @@
     # Render problem checkbox
     my $prob_checkbox = '<input type="checkbox" name="renderprob" ';
     if (exists($env{'form.renderprob'}) && $env{'form.renderprob'} eq 'true') {
-        $prob_checkbox .= 'checked ';
+        $prob_checkbox .= 'checked="checked" ';
     }
     $prob_checkbox .= 'value="true" />';
     #
     # Compute correct answers checkbox
     my $ans_checkbox = '<input type="checkbox" name="correctans" ';
     if (exists($env{'form.correctans'}) && $env{'form.correctans'} eq 'true') {
-        $ans_checkbox .= 'checked ';
+        $ans_checkbox .= 'checked="checked" ';
     }
     $ans_checkbox .= 'value="true" />';
     #
@@ -1124,7 +1131,7 @@
     my $all_sub_checkbox = '<input type="checkbox" name="all_sub" ';
     if (exists($env{'form.all_sub'}) && 
         $env{'form.all_sub'} eq 'true') {
-        $all_sub_checkbox .= 'checked ';
+        $all_sub_checkbox .= 'checked="checked" ';
     }
     $all_sub_checkbox.= 'value="true" />';
     #
@@ -1132,7 +1139,7 @@
     my $prob_status_checkbox = '<input type="checkbox" name="prob_status" ';
     if (exists($env{'form.prob_status'}) && 
         $env{'form.prob_status'} eq 'true') {
-        $prob_status_checkbox .= 'checked ';
+        $prob_status_checkbox .= 'checked="checked" ';
     }
     $prob_status_checkbox .= 'value="true" />';
     #
@@ -1149,8 +1156,10 @@
         '</b></label><br />'.
         '</td>';
     #
-    $Str .= '</tr>'."\n";
-    $Str .= '</table>'."\n";
+    $Str .= '<td align="center" valign="top">'.$output_selector.'</td>';
+    #
+    $Str .= &Apache::loncommon::end_data_table_row();
+    $Str .= &Apache::loncommon::end_data_table();
     #
     $Str .= '<p><span class="LC_nobreak">'
            .&mt('Status: [_1]',
Index: loncom/interface/statistics/lonsubmissiontimeanalysis.pm
diff -u loncom/interface/statistics/lonsubmissiontimeanalysis.pm:1.29 loncom/interface/statistics/lonsubmissiontimeanalysis.pm:1.30
--- loncom/interface/statistics/lonsubmissiontimeanalysis.pm:1.29	Thu Oct 23 09:07:51 2008
+++ loncom/interface/statistics/lonsubmissiontimeanalysis.pm	Thu Oct 30 17:45:25 2008
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonsubmissiontimeanalysis.pm,v 1.29 2008/10/23 09:07:51 bisitz Exp $
+# $Id: lonsubmissiontimeanalysis.pm,v 1.30 2008/10/30 17:45:25 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -71,7 +71,10 @@
     my @Students = @Apache::lonstatistics::Students;
     #
     if (@Students < 1) {
-        $r->print('<h2>There are no students in the sections selected</h2>');
+        $r->print('<div class="LC_warning">'
+                 .&mt('There are no students in the sections selected.'
+                 .'</div>')
+        );
     }
     #
     my @CacheButtonHTML = 
@@ -81,7 +84,8 @@
     if (! exists($env{'form.problemchoice'}) ||
         exists($env{'form.SelectAnother'})) {
         my $submit_button = '<input type="submit" name="" value="'.
-            &mt('Graph Problem Submission Times').'" />';
+#           &mt('Graph Problem Submission Times').'" />';
+            &mt('Generate Graph').'" />';
         $r->print($submit_button.'&nbsp;'x5);
         $r->print('<h3>'.&mt('Please select a problem to analyze').'</h3>');
         $r->print(&Apache::lonstathelpers::problem_selector('.',
@@ -124,7 +128,10 @@
         #
         my $resource = $current_problem->{'resource'};
         if (! defined($resource)) {
-            $r->print('resource is undefined');
+            $r->print('<div class="LC_warning">'
+                     .&mt('Resource is undefined.')
+                     .'</div>'
+            );
         } else {
             $r->print('<h1>'.$resource->compTitle.'</h1>');
             $r->print('<h3>'.$resource->src.'</h3>');
@@ -132,8 +139,9 @@
                  &Apache::lonstatistics::section_and_enrollment_description().
                       '</h4>');
             $r->rflush();
+            $r->print('<hr />');
             $r->print(&Apache::lonstathelpers::render_resource($resource));
-            $r->print('<br />');
+            $r->print('<hr /><br />');
             $r->rflush();
 	    if (@Students) {	    
 		$r->print(&analyze_times($r,$resource->symb,\@Students,
@@ -180,12 +188,16 @@
          $Apache::lonstatistics::enrollment_status,
          $symb,$part);
     if (! defined($SubData) || ! ref($SubData)) {
-        $html.= '<h2>There is no submission data for this problem at all</h2>';
+        $html.= '<div class="LC_warning">'
+               .&mt('There is no submission data for this problem at all.')
+               .'</div>';
         return $html;
     }
     my $NumSub = scalar(@{$SubData});
     if (! @{$SubData}) {
-        $html.= '<h2>There is no submission data for this problem</h2>';
+        $html.= '<div class="LC_warning">'
+               .&mt('There is no submission data for this problem.')
+               .'</div>';
         return $html;
     }
     # Process the data
@@ -400,15 +412,16 @@
     my $Str = '';
     $Str .= &Apache::lonhtmlcommon::breadcrumbs('Submission Time Plots');
     $Str .= '<p>';
-    $Str .= '<table cellspacing="5">'."\n";
-    $Str .= '<tr>';
-    $Str .= '<th align="center">'.&mt('Sections').'</th>';
-    $Str .= '<th align="center">'.&mt('Groups').'</th>';
-    $Str .= '<th align="center">'.&mt('Access Status').'</th>';
-    $Str .= '</tr>'."\n";
+    $Str .= &Apache::loncommon::start_data_table();
+    $Str .= &Apache::loncommon::start_data_table_header_row();
+    $Str .= '<th>'.&mt('Sections').'</th>';
+    $Str .= '<th>'.&mt('Groups').'</th>';
+    $Str .= '<th>'.&mt('Access Status').'</th>';
+    $Str .= &Apache::loncommon::end_data_table_header_row();
     ##
     ## 
-    $Str .= '<tr><td align="center">'."\n";
+    $Str .= &Apache::loncommon::start_data_table_row();
+    $Str .= '<td align="center">'."\n";
     $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',4);
     $Str .= '</td>';
     #
@@ -420,8 +433,8 @@
     $Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,4);
     $Str .= '</td>';
     #
-    $Str .= '</tr>'."\n";
-    $Str .= '</table>'."\n";
+    $Str .= &Apache::loncommon::end_data_table_row();
+    $Str .= &Apache::loncommon::end_data_table();
     #
     $Str .= '<p><span class="LC_nobreak">'
            .&mt('Status: [_1]',
Index: loncom/interface/statistics/lonsurveyreports.pm
diff -u loncom/interface/statistics/lonsurveyreports.pm:1.18 loncom/interface/statistics/lonsurveyreports.pm:1.19
--- loncom/interface/statistics/lonsurveyreports.pm:1.18	Thu Oct 23 09:07:51 2008
+++ loncom/interface/statistics/lonsurveyreports.pm	Thu Oct 30 17:45:25 2008
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonsurveyreports.pm,v 1.18 2008/10/23 09:07:51 bisitz Exp $
+# $Id: lonsurveyreports.pm,v 1.19 2008/10/30 17:45:25 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -133,7 +133,10 @@
             $r->print('<h1>'.$resource->compTitle.'</h1>');
             $r->print('<h3>'.$resource->src.'</h3>');
             if ($env{'form.renderprob'} eq 'true') {
-                $r->print(&Apache::lonstathelpers::render_resource($resource));
+                $r->print('<hr />'
+                         .&Apache::lonstathelpers::render_resource($resource)
+                         .'<hr />'
+                );
             }
             $r->rflush();
             my %Data = &Apache::lonstathelpers::get_problem_data
@@ -201,7 +204,7 @@
               resptype=>undef});
         my $checked = '';
         if ($env{'form.problemchoice'} eq $value) {
-            $checked = 'checked ';
+            $checked = 'checked="checked" ';
         }
         my $link = $problem->{'res'}->link.
             '?symb='.&escape($problem->{'res'}->shown_symb);
@@ -613,23 +616,24 @@
                                 ) {
         $output_selector.='<option value="'.$output_format->{'name'}.'"';
         if ($env{'form.output'} eq $output_format->{'name'}) {
-            $output_selector.=' selected';
+            $output_selector.=' selected="selected"';
         }
         $output_selector.= '>'.$output_format->{'text'}.'</option>'.$/;
     }
     $output_selector .= '</select>'.$/;
     $Str .= &Apache::lonhtmlcommon::breadcrumbs('Student Submission Reports');
     $Str .= '<p>';
-    $Str .= '<table cellspacing="5">'."\n";
-    $Str .= '<tr>';
+    $Str .= &Apache::loncommon::start_data_table();
+    $Str .= &Apache::loncommon::start_data_table_header_row();
     $Str .= '<th>'.&mt('Sections').'</th>';
     $Str .= '<th>'.&mt('Groups').'</th>';
     $Str .= '<th>'.&mt('Access Status').'</th>';
     $Str .= '<th>'.&mt('Output Format').'</th>';
-    $Str .= '<th>'.'&nbsp;'.'</th>';
-    $Str .= '</tr>'."\n";
+    $Str .= '<th>'.&mt('Options').'</th>';
+    $Str .= &Apache::loncommon::end_data_table_header_row();
     #
-    $Str .= '<tr><td align="center">'."\n";
+    $Str .= &Apache::loncommon::start_data_table_row();
+    $Str .= '<td align="center">'."\n";
     $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5);
     $Str .= '</td>';
     #
@@ -646,7 +650,7 @@
     # Render problem checkbox
     my $prob_checkbox = '<input type="checkbox" name="renderprob" ';
     if (exists($env{'form.renderprob'}) && $env{'form.renderprob'} eq 'true') {
-        $prob_checkbox .= 'checked ';
+        $prob_checkbox .= 'checked="checked" ';
     }
     $prob_checkbox .= 'value="true" />';
     $Str .= '<td align="right" valign="top">'.
@@ -655,8 +659,8 @@
         '<label><b>'.
         '</td>';
     #
-    $Str .= '</tr>'."\n";
-    $Str .= '</table>'."\n";
+    $Str .= &Apache::loncommon::end_data_table_row();
+    $Str .= &Apache::loncommon::end_data_table();
     #
     $Str .= '<p><span class="LC_nobreak">'
            .&mt('Status: [_1]',

--bisitz1225388726--