--- rat/lonratedt.pm 2005/06/08 15:44:51 1.67 +++ rat/lonratedt.pm 2006/06/19 09:42:56 1.80 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Edit Handler for RAT Maps # -# $Id: lonratedt.pm,v 1.67 2005/06/08 15:44:51 www Exp $ +# $Id: lonratedt.pm,v 1.80 2006/06/19 09:42:56 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 @@ -172,8 +172,11 @@ use Apache::lonsequence; use Apache::loncommon; use Apache::lonlocal; use File::Copy; +use lib '/home/httpd/lib/perl/'; +use LONCAPA; + -use vars qw(@order @resources @resparms @zombies %revzombies); +use vars qw(@order @resources @resparms @zombies); # Mapread read maps into global arrays @links and @resources, determines status @@ -189,13 +192,11 @@ sub mapread { 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); } @@ -205,11 +206,11 @@ sub mapread { my ($command,$number,$content)=split(/\<\:\>/,$_); if ($command eq 'objcont') { my ($title,$src,$ext,$type)=split(/\:/,$content); + if ($ext eq 'cond') { next; } if ($type ne 'zombie') { $resources[$number]=$content; } else { $zombies[$number]=$content; - $revzombies{$src}=$number; } } if ($command eq 'objlinks') { @@ -407,25 +408,31 @@ sub attemptread { # --------------------------------------------------------- Build up RAT screen sub ratedt { my ($r,$url)=@_; - my $frameset = '