--- loncom/interface/lonprintout.pm 2012/12/28 00:25:11 1.627.2.1
+++ loncom/interface/lonprintout.pm 2013/08/08 15:40:59 1.627.2.7
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.627.2.1 2012/12/28 00:25:11 raeburn Exp $
+# $Id: lonprintout.pm,v 1.627.2.7 2013/08/08 15:40:59 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -149,8 +149,7 @@ sub printable_sequence {
# Return:
# XML that can be parsed by the helper to drive the state machine.
#
-sub create_incomplete_folder_selstud_helper($helper)
-{
+sub create_incomplete_folder_selstud_helper {
my ($helper, $map) = @_;
@@ -721,7 +720,7 @@ sub incomplete {
# print_resources.
#
sub master_seq_to_person_seq {
- my ($map, $seq, $who, $code) = @_;
+ my ($map, $seq, $who, $code, $nohidemap) = @_;
my ($username, $userdomain, $usersection) = split(/:/, $who);
@@ -732,9 +731,14 @@ sub master_seq_to_person_seq {
my %seq_hash = map {$_ => 1} @$seq;
my @output_seq;
+
+ my $unhidden;
+ if ($perm{'pav'} && $perm{'vgr'} && $nohidemap) {
+ $unhidden = &Apache::lonnet::clutter($map);
+ }
my $navmap = Apache::lonnavmaps::navmap->new($username, $userdomain,
- $code);
+ $code,$unhidden);
my ($start,$finish);
if ($map) {
@@ -754,7 +758,6 @@ sub master_seq_to_person_seq {
# Iterate on the resource..select the items that are randomly selected
# and that are in the seq_has. Presumably the iterator will take care
# of the random ordering part of the deal.
- #
my $curres;
while ($curres = $iterator->next()) {
#
@@ -1106,7 +1109,7 @@ sub format_page_header {
# there is '\\ \\ ' in the page header. That's cause a error in LaTeX
if($format =~ /\\\\\s\\\\\s/) {
#TODO find sensible caption for page header
- my $testPrintout = '\\\\'.&mt('Construction Space').' \\\\'.&mt('Test-Printout ');
+ my $testPrintout = '\\\\'.&mt('Authoring Space').' \\\\'.&mt('Test-Printout ');
$format =~ s/\\\\\s\\\\\s/$testPrintout/;
}
#
@@ -2165,7 +2168,7 @@ sub print_page_in_course {
$form{'grade_target'} = 'tex';
$form{'textwidth'} = &get_textwidth($helper, $LaTeXwidth);
- $form{'pdfFormFields'} = $pdfFormFields; #
+ $form{'pdfFormFields'} = 'no'; #
$form{'showallfoils'} = $helper->{'VARS'}->{'showallfoils'};
$form{'problem_split'}=$parmhash{'problem_stream_switch'};
@@ -2218,7 +2221,7 @@ sub print_page_in_course {
$texversion.=&path_to_problem($urlp,$LaTeXwidth);
} else {
$texversion.='\vskip 0 mm \noindent\textbf{'.
- &mt("Printing from Construction Space: No Title").'}\vskip 0 mm ';
+ &mt("Printing from Authoring Space: No Title").'}\vskip 0 mm ';
$texversion.=&path_to_problem($urlp,$LaTeXwidth);
}
$texversion.='\vskip 1 mm '.$answer.'\end{document}';
@@ -2701,7 +2704,7 @@ ENDPART
my %form;
$form{'grade_target'} = 'tex';
$form{'textwidth'} = &get_textwidth($helper, $LaTeXwidth);
- $form{'pdfFormFields'} = $pdfFormFields;
+ $form{'pdfFormFields'} = 'no';
# If form.showallfoils is set, then request all foils be shown:
# privilege will be enforced both by not allowing the
@@ -2799,7 +2802,7 @@ ENDPART
$texversion.=&path_to_problem($cleanURL,$LaTeXwidth);
} else {
$texversion.='\vskip 0 mm \noindent\textbf{'.
- &mt("Printing from Construction Space: No Title").'}\vskip 0 mm ';
+ &mt("Printing from Authoring Space: No Title").'}\vskip 0 mm ';
$texversion.=&path_to_problem($cleanURL,$LaTeXwidth);
}
@@ -3193,7 +3196,7 @@ ENDPART
$i=int($student_counter/$helper->{'VARS'}{'NUMBER_TO_PRINT'});
}
my $actual_seq = master_seq_to_person_seq($map, \@master_seq,
- $person);
+ $person, undef, 1);
my ($output,$fullname, $printed)=&print_resources($r,$helper,
$person,$type,
\%moreenv, $actual_seq,
@@ -3310,11 +3313,11 @@ ENDPART
$moreenv{'CODE'}=&num_to_letters($code);
}
my $actual_seq = \@master_seq;
- if ($randomorder) {
+ if ($randomorder || $randompick) {
$env{'form.CODE'} = $moreenv{'CODE'};
$actual_seq = master_seq_to_person_seq($map, \@master_seq,
undef,
- $moreenv{'CODE'});
+ $moreenv{'CODE'}, 1);
delete($env{'form.CODE'});
}
my ($output,$fullname, $printed)=
@@ -3372,7 +3375,7 @@ ENDPART
$texversion.=&path_to_problem ($urlp,$LaTeXwidth);
} else {
$texversion.='\vskip 0 mm \noindent\textbf{'.
- &mt("Printing from Construction Space: No Title").'}\vskip 0 mm ';
+ &mt("Printing from Authoring Space: No Title").'}\vskip 0 mm ';
$texversion.=&path_to_problem ($urlp,$LaTeXwidth);
}
$texversion.='\vskip 1 mm '.$answer.'\end{document}';
@@ -4138,13 +4141,13 @@ sub printHelper {
my $start_new_option;
if ($perm{'pav'}) {
$start_new_option =
- "before selected').
+ "').
"' variable='FINISHPAGE' />".
- "before selected').
+ "').
"' variable='EXTRASPACE' type='text' />" .
"".
- "check for mm').
+ "').
"' variable='EXTRASPACE_UNITS' type='checkbox' />"
;
@@ -4309,7 +4312,7 @@ my $suffixXml = <new("START", "Select Printing Options:");
if (!$res_printable) {
$paramHash = Apache::lonhelper::getParamHash();
- $paramHash->{MESSAGE_TEXT} =
- &mt('[_1]Printing for current resource is only possible between [_2] and [_3]',
- '
',$res_printstartdate, $res_printenddate.'
');
+ $paramHash->{MESSAGE_TEXT} =
+ '
'
+ .&mt('Printing for current resource is only possible between [_1] and [_2]',
+ $res_printstartdate, $res_printenddate).'
';
Apache::lonhelper::message->new();
}
$paramHash = Apache::lonhelper::getParamHash();
@@ -5009,9 +5013,6 @@ sub render {
my $PaperType=&mt('Paper type');
my $landscape=&mt('Landscape');
my $portrait=&mt('Portrait');
- my $pdfFormLabel=&mt('PDF-Formfields');
- my $with=&mt('with Formfields');
- my $without=&mt('without Formfields');
$result.='