--- loncom/interface/lonprintout.pm 2003/02/04 20:59:26 1.110 +++ loncom/interface/lonprintout.pm 2003/02/04 22:22:07 1.111 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.110 2003/02/04 20:59:26 sakharuk Exp $ +# $Id: lonprintout.pm,v 1.111 2003/02/04 22:22:07 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -745,7 +745,32 @@ sub coming_from_hash_whole { push @resourcelist,$hash{'src_'.$current_resource}.'&&'.$symb; } $current_resource = $hash{'goesto_'.$hash{'to_'.$current_resource}}; - } + } + #needs if final resource in the map (type="finish") contains something + if ($hash{'src_'.$current_resource}=~/\.sequence$/) { + push @resourcelist,&coming_from_hash_whole($hash{'src_'.$current_resource}); + } else { + my $presymb; + if ($mainsequence =~ /\/res\/(.*)$/) {$presymb = $1;} + elsif ($mainsequence =~ /\/?(uploaded\/(.*))$/) {$presymb = $1;} + my $rid = $hash{'ids_'.$hash{'src_'.$current_resource}}; + if ($rid=~/,/) { + my @rid = split /,/, $rid; + foreach my $rid_element (@rid) { + if ($rid_element =~ m/^$mapid\.(\d*)/) { + $rid = $1; + last; + } + } + } else { + $rid =~ m/^$mapid\.(\d*)/; + $rid = $1; + } + $hash{'src_'.$current_resource} =~ m/\/res\/(.*)$/; + my $symb = $presymb.'___'.$rid.'___'.$1; + push @resourcelist,$hash{'src_'.$current_resource}.'&&'.$symb; + } + $current_resource = $hash{'goesto_'.$hash{'to_'.$current_resource}}; return @resourcelist; }