Diff for /rat/lonratedt.pm between versions 1.65 and 1.67

version 1.65, 2005/04/07 06:56:27 version 1.67, 2005/06/08 15:44:51
Line 173  use Apache::loncommon; Line 173  use Apache::loncommon;
 use Apache::lonlocal;  use Apache::lonlocal;
 use File::Copy;  use File::Copy;
   
 use vars qw(@order @resources @resparms);  use vars qw(@order @resources @resparms @zombies %revzombies);
   
   
 # Mapread read maps into global arrays @links and @resources, determines status  # Mapread read maps into global arrays @links and @resources, determines status
Line 188  sub mapread { Line 188  sub mapread {
     undef @resources;      undef @resources;
     undef @order;      undef @order;
     undef @resparms;      undef @resparms;
       undef @zombies;
       undef %revzombies;
   
     @resources=('');      @resources=('');
     @order=();      @order=();
     @resparms=();      @resparms=();
       @zombies=();
       %revzombies=();
   
     my ($outtext,$errtext)=&Apache::lonratsrv::loadmap($fn,'');      my ($outtext,$errtext)=&Apache::lonratsrv::loadmap($fn,'');
     if ($errtext) { return ($errtext,2); }      if ($errtext) { return ($errtext,2); }
Line 199  sub mapread { Line 204  sub mapread {
     foreach (split(/\<\&\>/,$outtext)) {      foreach (split(/\<\&\>/,$outtext)) {
  my ($command,$number,$content)=split(/\<\:\>/,$_);   my ($command,$number,$content)=split(/\<\:\>/,$_);
         if ($command eq 'objcont') {          if ($command eq 'objcont') {
     $resources[$number]=$content;      my ($title,$src,$ext,$type)=split(/\:/,$content);
       if ($type ne 'zombie') {
    $resources[$number]=$content;
       } else {
    $zombies[$number]=$content;
    $revzombies{$src}=$number;
       }
         }          }
         if ($command eq 'objlinks') {          if ($command eq 'objlinks') {
             $links[$number]=$content;              $links[$number]=$content;
Line 296  sub attemptread { Line 307  sub attemptread {
     foreach (split(/\<\&\>/,$outtext)) {      foreach (split(/\<\&\>/,$outtext)) {
  my ($command,$number,$content)=split(/\<\:\>/,$_);   my ($command,$number,$content)=split(/\<\:\>/,$_);
         if ($command eq 'objcont') {          if ($command eq 'objcont') {
     $theseres[$number]=$content;      my ($title,$src,$ext,$type)=split(/\:/,$content);
       unless ($type eq 'zombie') {
    $theseres[$number]=$content;
       }
         }          }
         if ($command eq 'objlinks') {          if ($command eq 'objlinks') {
             $links[$number]=$content;              $links[$number]=$content;
Line 733  sub smpedt { Line 747  sub smpedt {
    }     }
 # ---------------------------------------------------------- Process form input  # ---------------------------------------------------------- Process form input
   
    my @importselect=();     my @importselect=&Apache::loncommon::get_env_multiple('form.importsel');
    my @targetselect=();     my @targetselect=&Apache::loncommon::get_env_multiple('form.target');
    undef @importselect;  
    undef @targetselect;  
    if (defined($env{'form.importsel'})) {  
        if (ref($env{'form.importsel'})) {  
    @importselect=sort(@{$env{'form.importsel'}});  
        } else {  
            @importselect=($env{'form.importsel'});  
        }  
    }  
    if (defined($env{'form.target'})) {  
        if (ref($env{'form.target'})) {  
    @targetselect=sort(@{$env{'form.target'}});  
        } else {  
            @targetselect=($env{'form.target'});  
        }  
    }  
 # ============================================================ Process commands  # ============================================================ Process commands
   
    my $targetdetail=$env{'form.targetdetail'};     my $targetdetail=$env{'form.targetdetail'};

Removed from v.1.65  
changed lines
  Added in v.1.67


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