--- rat/lonsequence.pm 2013/11/28 02:23:25 1.44 +++ rat/lonsequence.pm 2014/12/15 00:46:52 1.45 @@ -2,7 +2,7 @@ # # Sequence Handler # -# $Id: lonsequence.pm,v 1.44 2013/11/28 02:23:25 raeburn Exp $ +# $Id: lonsequence.pm,v 1.45 2014/12/15 00:46:52 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -133,13 +133,13 @@ ENDSELECT .'


'); } my $idx=0; - foreach (&attemptread(&Apache::lonnet::filelocation('',$url))) { - if (defined($_)) { + foreach my $entry (&attemptread(&Apache::lonnet::filelocation('',$url))) { + if (defined($entry)) { $idx++; if ($successtied) { $r->print('
'); } - my ($title,$url)=split(/\:/,$_); + my ($title,$url)=split(/\:/,$entry); $title = &LONCAPA::map::qtescape($title); unless ($title) { $title=(split(/\//,$url))[-1] }; my $enc_title = &HTML::Entities::encode($title,'\'"<>&'); @@ -184,12 +184,12 @@ ENDCHECKBOX # ----------------------------------------------------------- Clean out selhash sub start_fresh_session { - foreach (keys %selhash) { - if ($_ =~ /^pre_/) { - delete $selhash{$_}; + foreach my $item (keys(%selhash)) { + if ($item =~ /^pre_/) { + delete $selhash{$item}; } - if ($_ =~ /^store/) { - delete $selhash{$_}; + if ($item =~ /^store/) { + delete $selhash{$item}; } } }