Diff for /loncom/interface/statistics/longradinganalysis.pm between versions 1.3 and 1.12

version 1.3, 2006/02/14 22:12:46 version 1.12, 2013/07/22 18:06:58
Line 55  sub build_grading_analysis_page { Line 55  sub build_grading_analysis_page {
     #      #
     my %saveable_parameters = ('Status' => 'scalar',      my %saveable_parameters = ('Status' => 'scalar',
                                'Section' => 'array',                                 'Section' => 'array',
                                  'Group' => 'array',
                                );                                 );
     &Apache::loncommon::store_course_settings('grading_analysis',      &Apache::loncommon::store_course_settings('grading_analysis',
                                               \%saveable_parameters);                                                \%saveable_parameters);
Line 68  sub build_grading_analysis_page { Line 69  sub build_grading_analysis_page {
     my @students = @Apache::lonstatistics::Students;      my @students = @Apache::lonstatistics::Students;
     #      #
     if (@students < 1 && exists($env{'form.firstrun'})) {      if (@students < 1 && exists($env{'form.firstrun'})) {
         $r->print('<h2>There are no students in the sections selected</h2>');          $r->print('<h2>There are no students in the sections/groups selected</h2>');
     }      }
     #      #
     #my @cache_button_HTML =       #my @cache_button_HTML = 
Line 148  sub build_grading_analysis_page { Line 149  sub build_grading_analysis_page {
   
 sub task_analysis {  sub task_analysis {
     my ($r,$problem,$students) = @_;      my ($r,$problem,$students) = @_;
     my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin      my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,scalar(@$students));
         ($r,'Student Answer Compilation Status',  
          'Student Answer Compilation Progress', scalar(@$students),  
          'inline',undef,'Statistics','stats_status');  
     my %graders;      my %graders;
     foreach my $student (@$students) {      foreach my $student (@$students) {
  my $sname = $student->{'username'};   my $sname = $student->{'username'};
Line 175  sub task_analysis { Line 173  sub task_analysis {
  }   }
   
  &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,   &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,
                                                  &mt('last student'));                                                       'last student');
   
     }      }
   
Line 196  sub task_analysis { Line 194  sub task_analysis {
  }   }
  close($outputfile);   close($outputfile);
  $r->print('<br />'.   $r->print('<br />'.
   '<a href="'.$filename.'">'.&mt('Your csv file.')."</a>\n");    '<a href="'.$filename.'">'.&mt('Your CSV file.')."</a>\n");
     } elsif ($env{'form.output'} eq 'excel') {      } elsif ($env{'form.output'} eq 'excel') {
  my ($excel_workbook,$excel_sheet,$filename,$format,$rows_output) =    my ($excel_workbook,$excel_sheet,$filename,$format,$rows_output) = 
     &init_excel_output($r);      &init_excel_output($r);
Line 215  sub task_analysis { Line 213  sub task_analysis {
   '<a href="'.$filename.'">'.    '<a href="'.$filename.'">'.
   &mt('Your Excel spreadsheet.').'</a>'."\n");    &mt('Your Excel spreadsheet.').'</a>'."\n");
     } else {      } else {
  $r->print('<table class="thinborder">');   $r->print(&Apache::loncommon::start_data_table());
  $r->print('<tr><th>Name (username)</th><th>Grades Assigned</th></tr>');   $r->print(&Apache::loncommon::start_data_table_header_row().
     '<th>'.&mt('Name (username)').'</th><th>'.&mt('Grades Assigned').'</th>'.
     &Apache::loncommon::end_data_table_header_row() );
  foreach my $line (@output) {   foreach my $line (@output) {
     $r->print(sprintf("<tr><td>%s (<tt>%s</tt>)</td><td>%s</td></tr>",      $r->print(&Apache::loncommon::start_data_table_row().
       @{$line}));        sprintf("<td>%s (<tt>%s</tt>)</td><td>%s</td></tr>",
         @{$line}).
         &Apache::loncommon::end_data_table_row());
  }   }
  $r->print('</table>');   $r->print(&Apache::loncommon::end_data_table());
     }      }
     &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);      &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);
 }  }
Line 263  sub init_excel_output { Line 265  sub init_excel_output {
  $format->{'h1'});   $format->{'h1'});
     $cols_output += 3;      $cols_output += 3;
     my $sectionstring = '';      my $sectionstring = '';
     my @Sections = &Apache::lonstatistics::get_selected_sections();  #    my @Sections = &Apache::lonstatistics::get_selected_sections(); #This is never used
     $excel_sheet->write($header_row,$cols_output++,      $excel_sheet->write($header_row,$cols_output++,
  &Apache::lonstatistics::section_and_enrollment_description('plaintext'),   &Apache::lonstatistics::section_and_enrollment_description('plaintext'),
  $format->{'h3'});   $format->{'h3'});
Line 299  sub create_interface { Line 301  sub create_interface {
     $output_selector .= '</select>'.$/;      $output_selector .= '</select>'.$/;
   
     my $str = '';      my $str = '';
     $str .= &Apache::lonhtmlcommon::breadcrumbs      $str .= &Apache::lonhtmlcommon::breadcrumbs('Detailed Grading Statistics');
         (undef,'Detailed Grading Statistics');  
     $str .= '<table cellspacing="5">'."\n";      $str .= '<table cellspacing="5">'."\n";
     $str .= '<tr>';      $str .= '<tr>';
     $str .= '<td align="center"><b>'.&mt('Sections').'</b></td>';      $str .= '<td align="center"><b>'.&mt('Sections').'</b></td>';
     $str .= '<td align="center"><b>'.&mt('Enrollment Status').'</b></td>';      $str .= '<td align="center"><b>'.&mt('Groups').'</b></td>';
     $str .= '<td>'.&mt('<b>Output as</b> [_1]',$output_selector).'</td>';      $str .= '<td align="center"><b>'.&mt('Access Status').'</b></td>';
       $str .= '<td>'.&mt('[_1]Output as[_2] [_3]','<b>',$output_selector,'</b>').'</td>';
     $str .= '</tr>'."\n";      $str .= '</tr>'."\n";
     ##      ##
     ##       ## 
Line 313  sub create_interface { Line 315  sub create_interface {
     $str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5);      $str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5);
     $str .= '</td>';      $str .= '</td>';
     #      #
       $str .= '<td align="center">'."\n";
       $str .= &Apache::lonstatistics::GroupSelect('Group','multiple',5);
       $str .= '</td>';
       #
     $str .= '<td align="center">';      $str .= '<td align="center">';
     $str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5);      $str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5);
     $str .= '</td>';      $str .= '</td>';
     #      #
     $str .= '<td>';      $str .= '<td>';
     ##  
     $str .= '<nobr><label>'.&mt('Status: [_1]',  
                                  '<input type="text" '.  
                                  'name="stats_status" size="60" value="" />'  
                                  ).  
                     '</label></nobr>';  
     $str .= '</td>';      $str .= '</td>';
     ##      ##
     ##      ##

Removed from v.1.3  
changed lines
  Added in v.1.12


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>