Diff for /loncom/interface/statistics/lonstudentassessment.pm between versions 1.4 and 1.6

version 1.4, 2002/07/26 19:49:26 version 1.6, 2002/08/01 20:49:06
Line 49  sub BuildStudentAssessmentPage { Line 49  sub BuildStudentAssessmentPage {
         $studentInformation,$r,$c)=@_;          $studentInformation,$r,$c)=@_;
 #    $jr = $r;  #    $jr = $r;
     my %cache;      my %cache;
     unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) {      unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) {
         $r->print('<html><body>Unable to tie database.</body></html>');          $r->print('<html><body>Unable to tie database.</body></html>');
         return;          return;
     }      }
Line 98  sub BuildStudentAssessmentPage { Line 98  sub BuildStudentAssessmentPage {
     $r->print(&CreateTableHeadings(\%cache, $spacing, $infoKeys, $infoHeadings,      $r->print(&CreateTableHeadings(\%cache, $spacing, $infoKeys, $infoHeadings,
                                    $sequenceKeys, $sequenceHeadings));                                     $sequenceKeys, $sequenceHeadings));
     untie(%cache);      untie(%cache);
       if($c->aborted()) {  return $Str; }
   
     my $selected=0;      my $selected=0;
     $r->print('<pre>'."\n");      $r->print('<pre>'."\n");
     foreach (@$students) {      foreach (@$students) {
           if($c->aborted()) {  return $Str; }
         next if ($_ ne $selectedName &&           next if ($_ ne $selectedName && 
                  $selectedName ne 'All Students');                   $selectedName ne 'All Students');
         $selected = 1;          $selected = 1;
         my $courseData;           my $courseData; 
         if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) {          my $downloadTime='';
             if($cache{$_.':lastDownloadTime'} eq 'Not downloaded') {          if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) {
                 untie(%cache);              $downloadTime = $cache{$_.':lastDownloadTime'};
                 $courseData =               untie(%cache);
                     &Apache::loncoursedata::DownloadCourseInformation($_,           }
                                                                     $courseID);          if($downloadTime eq 'Not downloaded') {
                 if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT,0640)) {              $courseData = 
                     &Apache::loncoursedata::ProcessStudentData(\%cache,                   &Apache::loncoursedata::DownloadCourseInformation($_, 
                                                              $courseData, $_);                                                                    $courseID);
                     untie(%cache);              unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT(),0640)) {
                 } else {                  next;
                     last if($c->aborted());  
                     next;  
                 }  
             } else {  
                 untie(%cache);  
             }              }
         } else {              &Apache::loncoursedata::ProcessStudentData(\%cache, 
             last if($c->aborted());                                                         $courseData, $_);
             next;              untie(%cache);
         }          }
   
         last if ($c->aborted());          next if($c->aborted());
   
         if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) {          if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) {
             my $displayString = 'DISPLAYDATA'.$spacing;              my $displayString = 'DISPLAYDATA'.$spacing;
             $r->print(&Apache::lonhtmlcommon::FormatStudentInformation(              $r->print(&Apache::lonhtmlcommon::FormatStudentInformation(
                                                          \%cache, $_,                                                           \%cache, $_,

Removed from v.1.4  
changed lines
  Added in v.1.6


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