Diff for /loncom/interface/loncoursedata.pm between versions 1.23 and 1.24

version 1.23, 2002/08/28 22:02:47 version 1.24, 2002/08/28 22:42:15
Line 1095  sub DownloadStudentCourseData { Line 1095  sub DownloadStudentCourseData {
     my $title = 'LON-CAPA Statistics';      my $title = 'LON-CAPA Statistics';
     my $heading = 'Download and Process Course Data';      my $heading = 'Download and Process Course Data';
     my $studentCount = scalar(@$students);      my $studentCount = scalar(@$students);
     my %cache;  
   
   
     my $WhatIWant;      my $WhatIWant;
     $WhatIWant = '(^version:|';      $WhatIWant = '(^version:|';
Line 1113  sub DownloadStudentCourseData { Line 1111  sub DownloadStudentCourseData {
     my $displayString;      my $displayString;
     my $count=0;      my $count=0;
     foreach (@$students) {      foreach (@$students) {
           my %cache;
   
         if($c->aborted()) { return 'Aborted'; }          if($c->aborted()) { return 'Aborted'; }
   
         if($status eq 'true') {          if($status eq 'true') {
Line 1130  sub DownloadStudentCourseData { Line 1130  sub DownloadStudentCourseData {
   
         if($c->aborted()) { return 'Aborted'; }          if($c->aborted()) { return 'Aborted'; }
   
         if($downloadTime eq 'Not downloaded') {          if($downloadTime ne 'Not downloaded') {
             my $courseData =       next;
                 &DownloadCourseInformation($_, $courseID, $downloadTime,    }
                                            $WhatIWant);   my $courseData = 
             if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT(),0640)) {      &DownloadCourseInformation($_, $courseID, $downloadTime, 
                 foreach my $key (keys(%$courseData)) {         $WhatIWant);
                     if($key =~ /^(con_lost|error|no_such_host)/i) {   if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT(),0640)) {
                         $courseData->{$_.':error'} = 'No course data for '.$_;      foreach my $key (keys(%$courseData)) {
                         last;   if($key =~ /^(con_lost|error|no_such_host)/i) {
                     }      $courseData->{$_.':error'} = 'No course data for '.$_;
                 }      last;
                 if($extract eq 'true') {   }
                     &ExtractStudentData($courseData, \%cache, \%cache, $_);      }
                 } else {      if($extract eq 'true') {
                     &ProcessStudentData(\%cache, $courseData, $_);   &ExtractStudentData($courseData, \%cache, \%cache, $_);
                 }      } else {
                 untie(%cache);   &ProcessStudentData(\%cache, $courseData, $_);
             } else {      }
                 next;      untie(%cache);
             }   } else {
         }      next;
    }
     }      }
     if($status eq 'true') { &Apache::lonhtmlcommon::Close_PrgWin($r); }      if($status eq 'true') { &Apache::lonhtmlcommon::Close_PrgWin($r); }
   
Line 1172  sub DownloadStudentCourseDataSeparate { Line 1173  sub DownloadStudentCourseDataSeparate {
   
     &CheckForResidualDownload($courseID, $cacheDB, $students, $c);      &CheckForResidualDownload($courseID, $cacheDB, $students, $c);
   
     my %cache;  
   
     my $studentCount = scalar(@$students);      my $studentCount = scalar(@$students);
     if($status eq 'true') {      if($status eq 'true') {
         &Apache::lonhtmlcommon::Create_PrgWin($r, $title, $heading);          &Apache::lonhtmlcommon::Create_PrgWin($r, $title, $heading);
Line 1191  sub DownloadStudentCourseDataSeparate { Line 1190  sub DownloadStudentCourseDataSeparate {
             &Apache::lonhtmlcommon::Update_PrgWin($displayString, $r);              &Apache::lonhtmlcommon::Update_PrgWin($displayString, $r);
         }          }
   
           my %cache;
         my $downloadTime='Not downloaded';          my $downloadTime='Not downloaded';
         if($checkDate eq 'true'  &&           if($checkDate eq 'true'  && 
            tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) {             tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) {

Removed from v.1.23  
changed lines
  Added in v.1.24


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