Diff for /loncom/interface/loncoursedata.pm between versions 1.19 and 1.20

version 1.19, 2002/08/15 16:11:34 version 1.20, 2002/08/15 18:16:29
Line 119  sub DownloadClasslist { Line 119  sub DownloadClasslist {
     }      }
   
     %classlist=&Apache::lonnet::dump('classlist',$courseDomain, $courseNumber);      %classlist=&Apache::lonnet::dump('classlist',$courseDomain, $courseNumber);
     my ($checkForError)=keys (%classlist);      foreach(keys (%classlist)) {
     if($checkForError =~ /^(con_lost|error|no_such_host)/i) {          if(/^(con_lost|error|no_such_host)/i) {
         return \%classlist;              return \%classlist;
           }
     }      }
   
     foreach my $name (keys(%classlist)) {      foreach my $name (keys(%classlist)) {
Line 201  sub DownloadCourseInformation { Line 202  sub DownloadCourseInformation {
     if(!defined($WhatIWant)) {      if(!defined($WhatIWant)) {
         $WhatIWant = '.';          $WhatIWant = '.';
     }      }
         $WhatIWant = '.';  
     %courseData=&Apache::lonnet::dump($courseID, $domain, $name, $WhatIWant);      %courseData=&Apache::lonnet::dump($courseID, $domain, $name, $WhatIWant);
     $courseData{'UpToDate'} = 'false';      $courseData{'UpToDate'} = 'false';
     $courseData{'lastDownloadTime'}=time;      $courseData{'lastDownloadTime'}=time;
Line 547  sub ProcessClasslist { Line 547  sub ProcessClasslist {
         if($c->aborted()) {          if($c->aborted()) {
             return ();              return ();
         }          }
         push(@names,$name);  
         my $studentInformation = $classlist->{$name.':studentInformation'},          my $studentInformation = $classlist->{$name.':studentInformation'},
         my $sectionData = $classlist->{$name.':sections'},          my $sectionData = $classlist->{$name.':sections'},
         my $date = $classlist->{$name},          my $date = $classlist->{$name},
Line 561  sub ProcessClasslist { Line 560  sub ProcessClasslist {
             $cache->{$name.':updateTime'}=' Not updated';              $cache->{$name.':updateTime'}=' Not updated';
         }          }
   
         my ($checkForError)=keys(%$studentInformation);          my $error = 0;
         if($checkForError =~ /^(con_lost|error|no_such_host)/i) {          foreach(keys(%$studentInformation)) {
             $cache->{$name.':error'}=              if(/^(con_lost|error|no_such_host)/i) {
                 'Could not download student environment data.';                  $cache->{$name.':error'}=
             $cache->{$name.':fullname'}='';                      'Could not download student environment data.';
             $cache->{$name.':id'}='';                  $cache->{$name.':fullname'}='';
         } else {                  $cache->{$name.':id'}='';
             $cache->{$name.':fullname'}=&ProcessFullName(                  $error = 1;
               }
           }
           next if($error);
           push(@names,$name);
           $cache->{$name.':fullname'}=&ProcessFullName(
                                           $studentInformation->{'lastname'},                                            $studentInformation->{'lastname'},
                                           $studentInformation->{'generation'},                                            $studentInformation->{'generation'},
                                           $studentInformation->{'firstname'},                                            $studentInformation->{'firstname'},
                                           $studentInformation->{'middlename'});                                            $studentInformation->{'middlename'});
             $cache->{$name.':id'}=$studentInformation->{'id'};          $cache->{$name.':id'}=$studentInformation->{'id'};
         }  
   
         my ($end, $start)=split(':',$date);          my ($end, $start)=split(':',$date);
         $courseID=~s/\_/\//g;          $courseID=~s/\_/\//g;
Line 1016  sub DownloadStudentCourseData { Line 1019  sub DownloadStudentCourseData {
   
   
     my $WhatIWant;      my $WhatIWant;
     $WhatIWant = '(^version:.+?$|';      $WhatIWant = '(^version:|';
     $WhatIWant .= '^\d+:.+?:(resource\.\d+\.';      $WhatIWant .= '^\d+:.+?:(resource\.\d+\.';
     $WhatIWant .= '(solved|tries|previous|awarded|(\d+\.submission))\s*$';      $WhatIWant .= '(solved|tries|previous|awarded|(\d+\.submission))\s*$';
     $WhatIWant .= '|timestamp)';      $WhatIWant .= '|timestamp)';
     $WhatIWant .= ')';      $WhatIWant .= ')';
   #    $WhatIWant = '.';
   
     if($status eq 'true') {      if($status eq 'true') {
         &Apache::lonhtmlcommon::Create_PrgWin($r, $title, $heading);          &Apache::lonhtmlcommon::Create_PrgWin($r, $title, $heading);
Line 1079  sub DownloadStudentCourseDataSeparate { Line 1083  sub DownloadStudentCourseDataSeparate {
     my $title = 'LON-CAPA Statistics';      my $title = 'LON-CAPA Statistics';
     my $heading = 'Download Course Data';      my $heading = 'Download Course Data';
   
 #    my $WhatIWant = '.';  
     my $WhatIWant;      my $WhatIWant;
     $WhatIWant = '(^version:.+?$|';      $WhatIWant = '(^version:|';
     $WhatIWant .= '^\d+:.+?:(resource\.\d+\.';      $WhatIWant .= '^\d+:.+?:(resource\.\d+\.';
     $WhatIWant .= '(solved|tries|previous|awarded|(\d+\.submission))\s*$';      $WhatIWant .= '(solved|tries|previous|awarded|(\d+\.submission))\s*$';
     $WhatIWant .= '|timestamp)';      $WhatIWant .= '|timestamp)';
Line 1188  sub CheckForResidualDownload { Line 1191  sub CheckForResidualDownload {
         &Apache::lonhtmlcommon::Create_PrgWin($r, $title, $heading);          &Apache::lonhtmlcommon::Create_PrgWin($r, $title, $heading);
     }      }
   
     my c$ount=1;      my $count=1;
     foreach my $name (@students) {      foreach my $name (@students) {
         last if($c->aborted());          last if($c->aborted());
   

Removed from v.1.19  
changed lines
  Added in v.1.20


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