Diff for /loncom/interface/statistics/lonstudentsubmissions.pm between versions 1.3 and 1.10

version 1.3, 2004/02/20 16:38:49 version 1.10, 2004/03/16 16:41:26
Line 153  sub BuildStudentSubmissionsPage { Line 153  sub BuildStudentSubmissionsPage {
     }      }
 }  }
   
   
 #########################################################  #########################################################
 #########################################################  #########################################################
 ##  ##
Line 163  sub BuildStudentSubmissionsPage { Line 162  sub BuildStudentSubmissionsPage {
 #########################################################  #########################################################
 sub prepare_excel_output {  sub prepare_excel_output {
     my ($r,$problem,$ProblemData,$Students) = @_;      my ($r,$problem,$ProblemData,$Students) = @_;
       my $c = $r->connection();
     my ($resource,$respid,$partid) = ($problem->{'resource'},      my ($resource,$respid,$partid) = ($problem->{'resource'},
                                       $problem->{'respid'},                                        $problem->{'respid'},
                                       $problem->{'part'});                                        $problem->{'part'});
Line 170  sub prepare_excel_output { Line 170  sub prepare_excel_output {
               &mt('Preparing Excel spreadsheet of student responses').                &mt('Preparing Excel spreadsheet of student responses').
               '</h2>');                '</h2>');
     #      #
     &GetStudentAnswers($r,$problem,$Students);      &Apache::lonstathelpers::GetStudentAnswers($r,$problem,$Students);
     #      #
     my @Columns = ( 'username','domain','attempt','time',      my @Columns = ( 'username','domain','attempt','time',
                     'submission','correct', 'grading','awarded','weight',                      'submission','correct', 'grading','awarded','weight',
Line 209  sub prepare_excel_output { Line 209  sub prepare_excel_output {
     #      #
     # Populate the worksheet with the student data      # Populate the worksheet with the student data
     foreach my $student (@$Students) {      foreach my $student (@$Students) {
           last if ($c->aborted());
         my $results = &Apache::loncoursedata::get_response_data_by_student          my $results = &Apache::loncoursedata::get_response_data_by_student
             ($student,$resource->{'symb'},$respid);              ($student,$resource->{'symb'},$respid);
         my %row;          my %row;
Line 286  sub prepare_excel_output { Line 287  sub prepare_excel_output {
               '</a></p>'."\n");                '</a></p>'."\n");
 }  }
   
 sub GetStudentAnswers {  
     my ($r,$problem,$Students) = @_;  
     my %Answers;  
     my ($resource,$partid,$respid) = ($problem->{'resource'},  
                                       $problem->{'part'},  
                                       $problem->{'respid'});  
     # Open progress window  
     my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin  
         ($r,'Student Answer Compilation Status',  
          'Student Answer Compilation Progress', scalar(@$Students));  
     $r->print("<table>\n");  
     $r->rflush();  
     foreach my $student (@$Students) {  
         my $sname = $student->{'username'};  
         my $sdom = $student->{'domain'};  
         my $answer = &Apache::lonstathelpers::analyze_problem_as_student  
             ($resource,$sname,$sdom,$partid,$respid);  
         &Apache::lonnet::logthis('answer = "'.$answer.'"');  
         &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,  
                                                  &mt('last student'));  
         $student->{'answer'} = $answer;  
     }  
     $r->print("</table>\n");  
     $r->rflush();  
     # close progress window  
     &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);  
     return;  
 }  
   
   
 #########################################################  #########################################################
 #########################################################  #########################################################
 ##  ##
Line 328  sub CreateInterface { Line 299  sub CreateInterface {
     ## Environment variable initialization      ## Environment variable initialization
     my $Str = '';      my $Str = '';
     $Str .= &Apache::lonhtmlcommon::breadcrumbs      $Str .= &Apache::lonhtmlcommon::breadcrumbs
         (undef,&mt('Student Submission Reports'));          (undef,'Student Submission Reports');
     $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>';
Line 345  sub CreateInterface { Line 316  sub CreateInterface {
     $Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5);      $Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5);
     $Str .= '</td>';      $Str .= '</td>';
     #      #
       $Str .= '<td></td>';
       #
     my $only_seq_with_assessments = sub {       my $only_seq_with_assessments = sub { 
         my $s=shift;          my $s=shift;
         if ($s->{'num_assess'} < 1) {           if ($s->{'num_assess'} < 1) { 

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


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