--- loncom/interface/statistics/lonsubmissiontimeanalysis.pm	2008/10/30 17:45:25	1.30
+++ loncom/interface/statistics/lonsubmissiontimeanalysis.pm	2012/05/10 10:29:09	1.35
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonsubmissiontimeanalysis.pm,v 1.30 2008/10/30 17:45:25 bisitz Exp $
+# $Id: lonsubmissiontimeanalysis.pm,v 1.35 2012/05/10 10:29:09 goltermann Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -31,6 +31,7 @@ use strict;
 use Apache::lonnet;
 use Apache::loncommon();
 use Apache::lonhtmlcommon();
+use Apache::lonquickgrades();
 use Apache::loncoursedata();
 use Apache::lonstatistics;
 use Apache::lonstathelpers;
@@ -66,6 +67,8 @@ sub BuildSubmissionTimePage {
     #
     &Apache::lonstatistics::PrepareClasslist();    
     #
+    $r->print(&Apache::lonhtmlcommon::breadcrumbs('Submission Time Plots'));
+    &Apache::lonquickgrades::startGradeScreen($r,'statistics');
     $r->print(&CreateInterface());
     #
     my @Students = @Apache::lonstatistics::Students;
@@ -135,13 +138,12 @@ sub BuildSubmissionTimePage {
         } else {
             $r->print('<h1>'.$resource->compTitle.'</h1>');
             $r->print('<h3>'.$resource->src.'</h3>');
-            $r->print('<h4>'.
+            $r->print('<p>'.
                  &Apache::lonstatistics::section_and_enrollment_description().
-                      '</h4>');
+                      '</p>');
             $r->rflush();
-            $r->print('<hr />');
             $r->print(&Apache::lonstathelpers::render_resource($resource));
-            $r->print('<hr /><br />');
+            $r->print('<br />');
             $r->rflush();
 	    if (@Students) {	    
 		$r->print(&analyze_times($r,$resource->symb,\@Students,
@@ -274,25 +276,19 @@ sub analyze_times {
     }
     #
     # Build the data table
-    $htmltable = '<p>'.
-        '<table rules="groups" frame="border" '.
-        'summary="Student submission data">'.
-        '<thead>'.
-        '<tr>'.
+    $htmltable = '<br><h3>'.&mt('Student submission data').'</h3><p>'.
+        &Apache::loncommon::start_data_table().
+        &Apache::loncommon::start_data_table_header_row().
+        &Apache::loncommon::start_data_table_row().
         '<th valign="bottom">'.&mt('Begin').'</th>'.
-        '<th>'.('&nbsp;'x3).'</th>'.
         '<th valign="bottom">'.&mt('End').'</th>'.
         '<th valign="bottom">'.&mt('Submissions (plotted)').'</th>'.
-        '<th>'.('&nbsp;'x3).'</th>'.
         '<th valign="bottom">'.&mt('Correct Submissions (not plotted)').'</th>'.
-        '<th>'.('&nbsp;'x3).'</th>'.
         '<th valign="bottom">'.&mt('Cumulative Correct of those attempting the problem (not plotted)').'</th>'.
-        '<th>'.('&nbsp;'x3).'</th>'.
         '<th valign="bottom">'.&mt('Cumulative Percent Correct of those attempting the problem (not plotted)').'</th>'.
-        '<th>'.('&nbsp;'x3).'</th>'.
         '<th valign="bottom">'.&mt('Cumulative Percent Correct of selected students (plotted)').'</th>'.
-        '</tr>'.
-        '</thead>'.
+        &Apache::loncommon::end_data_table_row().
+        &Apache::loncommon::end_data_table_header_row().
         '<tbody>';
     my @CumulativeCorrect=(0);
     my @corr_as_percent_of_selected;
@@ -305,28 +301,23 @@ sub analyze_times {
             sprintf('%3.1f',100*$CumulativeCorrect[$i]/scalar(@$students));
         if ($Ydata[$i] != 0) {
             next if (! defined($BinEnd[$i]) || $BinEnd[$i] == 0);
-            $htmltable .= 
-                '<tr>'.
-                '<td align="right"><nobr>'.
+            $htmltable .=
+               &Apache::loncommon::start_data_table_row().
+                '<td align="right"><span class="LC_nobreak">'.
                 &Apache::lonlocal::locallocaltime($BinEnd[$i]-$binsize).
-                '</nobr></td>'.
-                '<td>&nbsp;</td>'.
-                '<td align="right"><nobr>'.
+                '</span></td>'.
+                '<td align="right"><span class="LC_nobreak">'.
                     &Apache::lonlocal::locallocaltime($BinEnd[$i]).'</td>'.
-                '</nobr></td>'.
+                '</span></td>'.
                 '<td align="right">'.$Ydata[$i].('&nbsp;'x3).'</td>'.
-                '<td>&nbsp;</td>'.
                 '<td align="right">'.$AnsData[$i].('&nbsp;'x3).'</td>'.
-                '<td>&nbsp;</td>'.
                 '<td align="right">'.$CumulativeCorrect[$i].'</td>'.
-                '<td>&nbsp;</td>'.
                 '<td align="right">'.$corr_as_percent_of_answering[$i].'</td>'.
-                '<td>&nbsp;</td>'.
                 '<td align="right">'.$corr_as_percent_of_selected[$i].'</td>'.
-                '</tr>'.$/;
+               &Apache::loncommon::end_data_table_row().$/;
         }
     }
-    $htmltable .= '</tbody></table></p>';
+    $htmltable .= '</tbody>'.&Apache::loncommon::end_data_table().'</p>';
     #
     # Build the plot
     my $title = '';#'Number of Submissions and Number Correct';
@@ -410,7 +401,6 @@ sub CreateInterface {
     ##
     ## Build the menu
     my $Str = '';
-    $Str .= &Apache::lonhtmlcommon::breadcrumbs('Submission Time Plots');
     $Str .= '<p>';
     $Str .= &Apache::loncommon::start_data_table();
     $Str .= &Apache::loncommon::start_data_table_header_row();
@@ -436,11 +426,6 @@ sub CreateInterface {
     $Str .= &Apache::loncommon::end_data_table_row();
     $Str .= &Apache::loncommon::end_data_table();
     #
-    $Str .= '<p><span class="LC_nobreak">'
-           .&mt('Status: [_1]',
-                    '<input type="text" name="stats_status"'
-                   .' size="60" value="" readonly="readonly" />')
-           .'</span></p>';
     $Str .= '</p>';
     ##
     return $Str;