--- rat/lonratedt.pm 2004/11/13 21:17:55 1.61 +++ rat/lonratedt.pm 2005/06/08 17:42:01 1.70 @@ -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.70 2005/06/08 17:42: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); # Mapread read maps into global arrays @links and @resources, determines status @@ -188,9 +188,12 @@ sub mapread { undef @resources; undef @order; undef @resparms; + undef @zombies; + @resources=(''); @order=(); @resparms=(); + @zombies=(); my ($outtext,$errtext)=&Apache::lonratsrv::loadmap($fn,''); if ($errtext) { return ($errtext,2); } @@ -199,7 +202,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 ($ext eq 'cond') { next; } + if ($type ne 'zombie') { + $resources[$number]=$content; + } else { + $zombies[$number]=$content; + } } if ($command eq 'objlinks') { $links[$number]=$content; @@ -296,7 +305,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 +405,10 @@ sub attemptread { # --------------------------------------------------------- Build up RAT screen sub ratedt { my ($r,$url)=@_; + my $frameset = '