--- loncom/interface/lonprintout.pm 2016/12/06 03:43:46 1.652 +++ loncom/interface/lonprintout.pm 2020/03/03 01:16:35 1.672 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.652 2016/12/06 03:43:46 raeburn Exp $ +# $Id: lonprintout.pm,v 1.672 2020/03/03 01:16:35 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 @@ -846,8 +847,9 @@ sub set_font_size { if ($font_size ne '') { $text =~ s/\\begin\{document}/\\begin{document}{\\$font_size/; + $text =~ s/\\end\{document}/}\\end{document}/; + } - $text =~ s/\\end\{document}/}\\end{document}/; return $text; @@ -889,7 +891,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); @@ -1232,7 +1234,7 @@ sub is_valid_alpha_code { sub is_code_valid { my ($code_value, $code_option) = @_; my ($code_type, $code_length) = ('letter', 6); # defaults. - my @lines = &Apache::grades::get_scantronformat_file(); + my @lines = &Apache::lonnet::get_scantronformat_file(); foreach my $line (@lines) { my ($name, $type, $length) = (split(/:/, $line))[0,2,4]; if($name eq $code_option) { @@ -1956,7 +1958,7 @@ sub latex_corrections { $result =~ s/(\\end\{document})/\\strut\\vspace\*{-4 mm}\\newline $copyright $end_of_student $1/; } $result =~ s/\$number_of_columns/$number_of_columns/g; - $result =~ s/(\\end\{longtable}\s*)(\\strut\\newline\\noindent\\makebox\[\\textwidth\/$number_of_columns\]\[b\]{\\hrulefill})/$2$1/g; + $result =~ s/(\\end\{longtable}\s*)(\\strut\\newline\\noindent\\makebox\[\\textwidth\/$number_of_columns\]\[b\]\{\\hrulefill})/$2$1/g; $result =~ s/(\\end\{longtable}\s*)\\strut\\newline/$1/g; #-- LaTeX corrections my $first_comment = index($result,'