--- loncom/interface/lonprintout.pm 2017/01/30 19:35:16 1.656 +++ loncom/interface/lonprintout.pm 2018/01/15 00:51:42 1.661 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.656 2017/01/30 19:35:16 raeburn Exp $ +# $Id: lonprintout.pm,v 1.661 2018/01/15 00:51:42 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -157,7 +157,7 @@ sub create_incomplete_folder_selstud_hel my $resource_chooser = &generate_resource_chooser('CHOOSE_INCOMPLETE_PEOPLE_SEQ', 'Select problem(s) to print', - 'multichoice="1" toponly="1" addstatus="1" closeallpages="1"', + 'multichoice="1" toponly="1" addstatus="1" closeallpages="1" modallink="1"', 'RESOURCES', 'CHOOSE_STUDENTS_INCOMPLETE', $map, @@ -206,7 +206,7 @@ sub create_incomplete_course_helper { my $resource_chooser = &generate_resource_chooser('INCOMPLETE_PROBLEMS_COURSE_RESOURCES', 'Select problem(s) to print', - 'multichoice = "1" suppressEmptySequences="0" addstatus="1" closeallpagtes="1"', + 'multichoice = "1" suppressEmptySequences="0" addstatus="1" closeallpagtes="1" modallink="1"', 'RESOURCES', 'INCOMPLETE_PROBLEMS_COURSE_STUDENTS', '', @@ -252,7 +252,7 @@ sub create_incomplete_folder_helper { my $resource_chooser = &generate_resource_chooser('CHOOSE_INCOMPLETE_SEQ', 'Select problem(s) to print', - 'multichoice="1", toponly ="1", addstatus="1", closeallpages="1"', + 'multichoice="1", toponly ="1", addstatus="1", closeallpages="1" modallink="1"', 'RESOURCES', 'PAGESIZE', $map, @@ -306,7 +306,8 @@ CHOOSE_STUDENTS # this_state - State name of the chooser. # prompt_text - Text to use to prompt user. # resource_options - Resource tag options e.g. -# "multichoice='1', toponly='1', addstatus='1'" +# "multichoice='1', toponly='1', addstatus='1', +# modallink='1'" # that control the selection and appearance of the # resource selector. # variable - Name of the variable to hold the choice @@ -889,7 +890,7 @@ sub include_pdf { my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'}; $file =~ s{(.*)/res/}{$londocroot/res/}; - open(FILE,">>$Apache::lonnet::perlvar{'lonPrtDir'}/$env{'user.name'}_$env{'user.domain'}_printout.dat"); + open(FILE,">>","$Apache::lonnet::perlvar{'lonPrtDir'}/$env{'user.name'}_$env{'user.domain'}_printout.dat"); print FILE ("$file\n"); close (FILE); @@ -2847,9 +2848,10 @@ ENDPART $result = &print_latex_header() . $result; } # End construction space sequence. - } elsif ($cleanURL=~/\/(smppg|syllabus|aboutme|bulletinboard)$/) { + } elsif ($cleanURL=~/\/(smppg|syllabus|aboutme|bulletinboard|ext\.tool)$/) { $form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'}; if ($currentURL=~/\/syllabus$/) {$currentURL=~s/\/res//;} + if ($currentURL=~/\/ext\.tool$/) {$currentURL=~s/^\/adm\/wrapper//;} $resources_printed .= $currentURL.':'; my $texversion = &ssi_with_retries($currentURL, $ssi_retry_count, %form); if ($helper->{'VARS'}->{'PRINT_ANNOTATIONS'} eq 'yes') { @@ -3046,9 +3048,10 @@ ENDPART } $result .= $texversion; $flag_latex_header_remove = 'YES'; - } elsif ($urlp=~/\/(smppg|syllabus|aboutme|bulletinboard)$/) { + } elsif ($urlp=~/\/(smppg|syllabus|aboutme|bulletinboard|ext\.tool)$/) { $form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'}; if ($urlp=~/\/syllabus$/) {$urlp=~s/\/res//;} + if ($urlp=~/\/ext\.tool$/) {$urlp=~s/^\/adm\/wrapper//;} $resources_printed .= $urlp.':'; my $texversion = &ssi_with_retries($urlp, $ssi_retry_count, %form); if ($helper->{'VARS'}->{'PRINT_ANNOTATIONS'} eq 'yes') { @@ -3452,7 +3455,9 @@ ENDPART if ($env{'request.enc'}) { $url = &Apache::lonenc::encrypted($url); } - $URLback = $url.($url =~ /\?/) ? '&':'?'.'?symb='.$helper->{VARS}{'symb'}; + if ($url ne '') { + $URLback = $url.(($url =~ /\?/) ? '&':'?').'symb='.$helper->{VARS}{'symb'}; + } } # # Final adjustment of the font size: @@ -3719,7 +3724,7 @@ sub print_resources { $rendered =~ s/\\end\{document}//; } $current_output .= $rendered; - } elsif ($res_url=~/\/(smppg|syllabus|aboutme|bulletinboard)$/) { + } elsif ($res_url=~/\/(smppg|syllabus|aboutme|bulletinboard|ext\.tool)$/) { if ($i == 1) { $syllabus_first = 1; } @@ -4210,7 +4215,7 @@ sub printHelper { } my $helperFragment = &generate_resource_chooser('CHOOSE_PROBLEMS_PAGE', 'Select Problem(s) to print', - "multichoice='1' toponly='1' addstatus='1' closeallpages='1'", + "multichoice='1' toponly='1' addstatus='1' closeallpages='1' modallink='1'", 'RESOURCES', 'PAGESIZE', $url, @@ -4220,7 +4225,7 @@ sub printHelper { $helperFragment .= &generate_resource_chooser('CHOOSE_RESOURCES_PAGE', 'Select Resource(s) to print', - 'multichoice="1" toponly="1" addstatus="1" closeallpages="1"', + 'multichoice="1" toponly="1" addstatus="1" closeallpages="1" modallink="1"', 'RESOURCES', 'PAGESIZE', $url, @@ -4285,7 +4290,7 @@ sub printHelper { 'CHOOSE_PROBLEMS_HTML']; my $helperFragment = &generate_resource_chooser('CHOOSE_PROBLEMS', 'Select Problem(s) to print', - 'multichoice="1" toponly="1" addstatus="1" closeallpages="1"', + 'multichoice="1" toponly="1" addstatus="1" closeallpages="1" modallink="1"', 'RESOURCES', 'PAGESIZE', $map, @@ -4294,7 +4299,7 @@ sub printHelper { $start_new_option); $helperFragment .= &generate_resource_chooser('CHOOSE_PROBLEMS_HTML', 'Select Resource(s) to print', - 'multichoice="1" toponly="1" addstatus="1" closeallpages="1"', + 'multichoice="1" toponly="1" addstatus="1" closeallpages="1" modallink="1"', 'RESOURCES', 'PAGESIZE', $map, @@ -4342,7 +4347,7 @@ ALL_PROBLEMS &Apache::lonxml::xmlparse($r, 'helper', &generate_resource_chooser('ALL_PROBLEMS', 'Select Problem(s) to print', - 'multichoice="1" suppressEmptySequences="0" addstatus="1" closeallpages="1"', + 'multichoice="1" suppressEmptySequences="0" addstatus="1" closeallpages="1" modallink="1"', 'RESOURCES', 'PAGESIZE', '', @@ -4351,7 +4356,7 @@ ALL_PROBLEMS $start_new_option) . &generate_resource_chooser('ALL_RESOURCES', 'Select Resource(s) to print', - " toponly='0' multichoice='1' suppressEmptySequences='0' addstatus='1' closeallpages='1'", + " toponly='0' multichoice='1' suppressEmptySequences='0' addstatus='1' closeallpages='1' modallink='1'", 'RESOURCES', 'PAGESIZE', '', @@ -4359,7 +4364,7 @@ ALL_PROBLEMS $start_new_option) . &generate_resource_chooser('ALL_PROBLEMS_STUDENTS', 'Select Problem(s) to print', - 'toponly="0" multichoice="1" suppressEmptySequences="0" addstatus="1" closeallpages="1"', + 'toponly="0" multichoice="1" suppressEmptySequences="0" addstatus="1" closeallpages="1" modallink="1"', 'RESOURCES', 'STUDENTS1', '', @@ -4403,7 +4408,7 @@ ALL_PROBLEMS # my $resource_selector= &generate_resource_chooser('SELECT_PROBLEMS', 'Select resources to print', - 'multichoice="1" addstatus="1" closeallpages="1"', + 'multichoice="1" addstatus="1" closeallpages="1" modallink="1"', 'RESOURCES', 'PRINT_FORMATTING', $map, @@ -4414,7 +4419,7 @@ ALL_PROBLEMS 'PRINT_FORMATTING'). &generate_resource_chooser('CHOOSE_STUDENTS_PAGE', 'Select Problem(s) to print', - "multichoice='1' addstatus='1' closeallpages ='1'", + "multichoice='1' addstatus='1' closeallpages ='1' modallink='1'", 'RESOURCES', 'PRINT_FORMATTING', $url, @@ -4513,7 +4518,7 @@ ALL_PROBLEMS $namechoice) . &generate_resource_chooser('SELECT_PROBLEMS_PAGE', 'Select Problem(s) to print', - "multichoice='1' addstatus='1' closeallpages ='1'", + "multichoice='1' addstatus='1' closeallpages ='1' modallink='1'", 'RESOURCES', 'PRINT_FORMATTING', $url, @@ -4537,7 +4542,7 @@ ALL_PROBLEMS PRINT_FORMATTING
Select resources for the assignment
+ closeallpages="1" modallink="1"> return $isNotMap; $map return $symbFilter; @@ -4682,7 +4687,7 @@ CHOOSE_FROM_SUBDIR (mark desired resources then click "next" button)
+ closeallpages="1" modallink="1"> PAGESIZE return $isNotMap return '$escapedSequenceName';