--- rat/lonratedt.pm 2004/11/17 20:14:23 1.63
+++ 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.63 2004/11/17 20:14:23 raeburn 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;
@@ -394,7 +408,7 @@ sub attemptread {
sub ratedt {
my ($r,$url)=@_;
my $frameset = '