--- rat/lonratedt.pm 2005/03/23 22:54:18 1.64
+++ rat/lonratedt.pm 2005/06/10 21:45:46 1.74
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Edit Handler for RAT Maps
#
-# $Id: lonratedt.pm,v 1.64 2005/03/23 22:54:18 raeburn Exp $
+# $Id: lonratedt.pm,v 1.74 2005/06/10 21:45:46 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -33,7 +33,7 @@ package Apache::lonratedt;
=head1 NAME
-Apache::lonratedt: advanced resource assembly tool
+Apache::lonratedt: simple resource assembly tool
=head1 SYNOPSIS
@@ -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;
@@ -394,7 +406,7 @@ sub attemptread {
sub ratedt {
my ($r,$url)=@_;
my $frameset = '