--- loncom/interface/lonprintout.pm 2002/09/12 15:08:43 1.62 +++ loncom/interface/lonprintout.pm 2002/09/12 15:25:49 1.63 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.62 2002/09/12 15:08:43 sakharuk Exp $ +# $Id: lonprintout.pm,v 1.63 2002/09/12 15:25:49 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -91,15 +91,15 @@ sub menu_for_output { ENDMENUOUT1 if ((not $ENV{'request.role'}=~m/^au\./) and (not $ENV{'request.role'}=~m/^ca\./)) { $r->print(< All problems from the sequence $title_for_sequence
- All problems plus any html/xml files from the sequence $title_for_sequence
+ All problems from $title_for_sequence
+ All problems plus any html/xml files from $title_for_sequence
ENDMENUOUT2 } if ($ENV{'request.role'}=~m/^cc\./ or $ENV{'request.role'}=~m/^in\./ or $ENV{'request.role'}=~m/^ta\./) { $r->print(< All problems in this course (warning: this may be time consuming)

- All problems from the sequence $title_for_sequence for selected students

+ All problems from $title_for_sequence for selected students

ENDMENUOUT6 } my $subdirtoprint = &Apache::lonnet::filelocation("",$ENV{'form.url'}); @@ -1036,11 +1036,18 @@ sub details_for_menu { my $name_of_resourse = $hash{'title_'.$hash{'ids_'.$ENV{'form.postdata'}}}; my $symbolic = &Apache::lonnet::symbread($ENV{'form.postdata'}); - $symbolic =~ m/([^_]+)_/; - my $name_of_sequence = $hash{'title_'.$hash{'ids_/res/'.$1}}; + my ($map,$id,$resource)=split(/___/,$symbolic); + my $name_of_sequence = $hash{'title_'.$hash{'ids_/res/'.$map}}; + if ($name_of_sequence =~ /^\s*$/) { + $map =~ m|([^/]+)$|; + $name_of_sequence = $1; + } my $name_of_map = $hash{'title_'.$hash{'ids_/res/'.$ENV{'request.course.uri'}}}; - - return $name_of_resourse,$name_of_sequence,$name_of_map; + if ($name_of_map =~ /^\s*$/) { + $ENV{'request.course.uri'} =~ m|([^/]+)$|; + $name_of_map = $1; + } + return ($name_of_resourse,$name_of_sequence,$name_of_map); }