--- rat/lonratedt.pm 2005/06/08 16:10:01 1.68 +++ rat/lonratedt.pm 2006/06/26 22:47:35 1.81 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Edit Handler for RAT Maps # -# $Id: lonratedt.pm,v 1.68 2005/06/08 16:10:01 www Exp $ +# $Id: lonratedt.pm,v 1.81 2006/06/26 22:47:35 albertel 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 = '