--- rat/lonratedt.pm 2004/11/13 21:17:55 1.61 +++ rat/lonratedt.pm 2005/06/08 16:10:01 1.68 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Edit Handler for RAT Maps # -# $Id: lonratedt.pm,v 1.61 2004/11/13 21:17:55 albertel Exp $ +# $Id: lonratedt.pm,v 1.68 2005/06/08 16:10:01 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 @@ -188,9 +188,14 @@ sub mapread { 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); } @@ -199,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; @@ -296,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; @@ -393,6 +407,10 @@ sub attemptread { # --------------------------------------------------------- Build up RAT screen sub ratedt { my ($r,$url)=@_; + my $frameset = '