--- loncom/interface/lonprintout.pm 2012/12/28 00:25:11 1.627.2.1 +++ loncom/interface/lonprintout.pm 2013/05/30 05:24:11 1.627.2.5 @@ -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.5 2013/05/30 05:24:11 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()) { # @@ -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'}; @@ -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 @@ -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, @@ -3314,7 +3317,7 @@ ENDPART $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)= @@ -4664,9 +4667,10 @@ CHOOSE_FROM_ANY_SEQUENCE Apache::lonhelper::state->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.='

'.&mt('Layout Options').'

' @@ -5020,7 +5021,6 @@ sub render { .''.$PageLayout.'' .''.$NumberOfColumns.'' .''.$PaperType.'' - .''.$pdfFormLabel.'' .&Apache::loncommon::end_data_table_header_row() .&Apache::loncommon::start_data_table_row() .'' @@ -5061,12 +5061,6 @@ sub render { $result .= < - - - HTML $result.=&Apache::loncommon::end_data_table_row() .&Apache::loncommon::end_data_table();