[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Tue, 04 Feb 2003 22:22:07 -0000
sakharuk Tue Feb 4 17:22:07 2003 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
I fixed my owd very stupid bug and now I can print problems from the whole course. Sorry for this bug.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.110 loncom/interface/lonprintout.pm:1.111
--- loncom/interface/lonprintout.pm:1.110 Tue Feb 4 15:59:26 2003
+++ loncom/interface/lonprintout.pm Tue Feb 4 17:22:07 2003
@@ -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 @@
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;
}