--- rat/lonratedt.pm 2004/04/24 15:05:16 1.55 +++ rat/lonratedt.pm 2005/06/08 15:44:51 1.67 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Edit Handler for RAT Maps # -# $Id: lonratedt.pm,v 1.55 2004/04/24 15:05:16 www Exp $ +# $Id: lonratedt.pm,v 1.67 2005/06/08 15:44:51 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -173,7 +173,7 @@ use Apache::loncommon; use Apache::lonlocal; 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 @@ -187,8 +187,15 @@ sub mapread { undef @links; undef @resources; undef @order; + undef @resparms; + undef @zombies; + undef %revzombies; + @resources=(''); @order=(); + @resparms=(); + @zombies=(); + %revzombies=(); my ($outtext,$errtext)=&Apache::lonratsrv::loadmap($fn,''); if ($errtext) { return ($errtext,2); } @@ -197,7 +204,13 @@ sub mapread { foreach (split(/\<\&\>/,$outtext)) { my ($command,$number,$content)=split(/\<\:\>/,$_); 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') { $links[$number]=$content; @@ -294,7 +307,10 @@ sub attemptread { foreach (split(/\<\&\>/,$outtext)) { my ($command,$number,$content)=split(/\<\:\>/,$_); 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') { $links[$number]=$content; @@ -391,6 +407,10 @@ sub attemptread { # --------------------------------------------------------- Build up RAT screen sub ratedt { my ($r,$url)=@_; + my $frameset = '