--- rat/lonratedt.pm 2002/05/16 21:10:05 1.20 +++ rat/lonratedt.pm 2002/05/22 13:31:22 1.26 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Edit Handler for RAT Maps # -# $Id: lonratedt.pm,v 1.20 2002/05/16 21:10:05 www Exp $ +# $Id: lonratedt.pm,v 1.26 2002/05/22 13:31:22 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -37,8 +37,8 @@ use Apache::Constants qw(:common); use Apache::lonnet; use Apache::lonratsrv; -my @order=(); -my @resources=(); +my @order; +my @resources; # Mapread read maps into global arrays @links and @resources, determines status @@ -52,6 +52,8 @@ sub mapread { undef @links; undef @resources; undef @order; + @resources=(''); + @order=(); my ($outtext,$errtext)=&Apache::lonratsrv::loadmap($fn,''); if ($errtext) { return ($errtext,2); } @@ -88,7 +90,7 @@ sub mapread { } } - for (my $i=0; $i<=$#resources; $i++) { + for (my $i=1; $i<=$#resources; $i++) { if (defined($resources[$i])) { unless (($starters[$i]) || ($endings[$i])) { return @@ -261,6 +263,7 @@ ENDDOCUMENT # ---------------------------------------------------------------- Make buttons sub buttons { + if ($ENV{'form.forceselect'}) { return ''; } my $adv=shift; my $output='