--- rat/lonsequence.pm 2012/12/16 17:48:39 1.42 +++ rat/lonsequence.pm 2014/12/15 00:46:52 1.45 @@ -2,7 +2,7 @@ # # Sequence Handler # -# $Id: lonsequence.pm,v 1.42 2012/12/16 17:48:39 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}; } } } @@ -305,15 +305,18 @@ sub handler { my %lt =&Apache::lonlocal::texthash( 'nere' => 'Next resource could not be displayed', 'goba' => 'Go Back', - 'nacc' => 'Navigate Course Content', + 'nacc' => 'Course Contents', ); + if (&Apache::loncommon::course_type() eq 'Community') { + $lt{'nav'} = &mt('Community Contents'); + } my $warnmsg; if ($arrow_dir eq 'forward') { $warnmsg = &mt('As all folders and sequences ' .'following the current resource were empty, ' .'you have now reached the end of the course.'); } elsif ($arrow_dir eq 'back') { - $warnmsg = &mt('As all folders and sequences '. + $warnmsg = &mt('As all folders and sequences ' .'preceding the current resource were empty, ' .'you have now reached the beginning of the course.'); }