--- loncom/interface/lonprintout.pm 2009/10/26 09:55:32 1.560.2.7
+++ loncom/interface/lonprintout.pm 2009/10/27 10:17:18 1.563
@@ -2,7 +2,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.560.2.7 2009/10/26 09:55:32 foxr Exp $
+# $Id: lonprintout.pm,v 1.563 2009/10/27 10:17:18 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1263,9 +1263,9 @@ sub page_format_transformation {
if ($selectionmade eq '4') {
if ($choice eq 'all_problems') {
- $assignment='Problems from the Whole Course';
+ $assignment=&mt('Problems from the Whole Course');
} else {
- $assignment='Resources from the Whole Course';
+ $assignment=&mt('Resources from the Whole Course');
}
} else {
$assignment=&Apache::lonxml::latex_special_symbols($assignment,'header');
@@ -3193,22 +3193,23 @@ sub printHelper {
my $varspostdata = $helper->{VARS}->{'postdata'};
my $varsassignment = $helper->{VARS}->{'assignment'};
my $page_navmap = Apache::lonnavmaps::navmap->new();
- my @page_resources = $page_navmap->retrieveResources($url);
- if(defined($page_resources[0])) {
- $page_ispage = $page_resources[0]->is_page();
- $page_title = $page_resources[0]->title();
- my $resourcesymb = $page_resources[0]->symb();
- my ($pagemap, $pageid, $pageurl) = &Apache::lonnet::decode_symb($symb);
- if ($page_ispage) {
- push @{$printChoices},
- [&mt('Selected [_1]Problems[_2] from page [_3]', '', '', ''.$page_title.''),
- 'map_problems_in_page',
- 'CHOOSE_PROBLEMS_PAGE'];
- push @{$printChoices},
- [&mt('Selected [_1]Resources[_2] from page [_3]', '', '', ''.$page_title.''),
- 'map_resources_in_page',
- 'CHOOSE_RESOURCES_PAGE'];
- }
+ if (defined($page_navmap)) {
+ my @page_resources = $page_navmap->retrieveResources($url);
+ if(defined($page_resources[0])) {
+ $page_ispage = $page_resources[0]->is_page();
+ $page_title = $page_resources[0]->title();
+ my $resourcesymb = $page_resources[0]->symb();
+ my ($pagemap, $pageid, $pageurl) = &Apache::lonnet::decode_symb($symb);
+ if ($page_ispage) {
+ push @{$printChoices},
+ [&mt('Selected [_1]Problems[_2] from page [_3]', '', '', ''.$page_title.''),
+ 'map_problems_in_page',
+ 'CHOOSE_PROBLEMS_PAGE'];
+ push @{$printChoices},
+ [&mt('Selected [_1]Resources[_2] from page [_3]', '', '', ''.$page_title.''),
+ 'map_resources_in_page',
+ 'CHOOSE_RESOURCES_PAGE'];
+ }
my $helperFragment = &generate_resource_chooser('CHOOSE_PROBLEMS_PAGE',
'Select Problem(s) to print',
"multichoice='1' toponly='1' addstatus='1' closeallpages='1'",
@@ -3234,7 +3235,8 @@ sub printHelper {
&Apache::lonxml::xmlparse($r, 'helper', $helperFragment);
- }
+ }
+ }
}
if (($helper->{'VAR'}->{'construction'} ne '1' ) &&