--- loncom/interface/lonprintout.pm 2024/11/11 00:43:39 1.703 +++ loncom/interface/lonprintout.pm 2024/12/10 04:52:30 1.705 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.703 2024/11/11 00:43:39 raeburn Exp $ +# $Id: lonprintout.pm,v 1.705 2024/12/10 04:52:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -812,16 +812,17 @@ sub map_print_dates { # Parameters: # $username - Name of user for whom we are checking. # $domain - Domain of user we are checking. +# $section - Section for user for whom we are checking. # $map - map name. # Returns: # 0 - map is not incomplete. # 1 - map is incomplete. # sub incomplete { - my ($username, $domain, $map) = @_; + my ($username, $domain, $section, $map) = @_; - my $navmap = Apache::lonnavmaps::navmap->new($username, $domain); + my $navmap = Apache::lonnavmaps::navmap->new($username, $domain, $section); if (defined($navmap)) { @@ -878,7 +879,7 @@ sub master_seq_to_person_seq { } my $navmap = Apache::lonnavmaps::navmap->new($username, $userdomain, - $code, $unhidden); + $usersection, $code, $unhidden); my ($start,$finish); if ($map) { @@ -1861,8 +1862,8 @@ sub old_character_chart { my %page_formats= ('letter' => { 'book' => { - '1' => [ '7.1 in','9.7 in', '-0.57 in','-0.57 in','0.1 in'], - '2' => ['3.66 in','9.8 in', '-0.57 in','-0.57 in','0.1 in'] + '1' => [ '7.1 in','9.7 in', '-0.57 in','-0.57 in','-0.5 in'], + '2' => ['3.66 in','9.8 in', '-0.57 in','-0.57 in','-0.5 in'] }, 'album' => { '1' => [ '8.8 in', '6.8 in','-0.55 in', '-0.55 in','-0.5 in'], @@ -2027,13 +2028,13 @@ sub page_format_transformation { $text =~ s/\\begin\{document}/\\setlength{\\oddsidemargin}{$oddoffset}\\setlength{\\evensidemargin}{$evenoffset}$topmargintoinsert\n\\setlength{\\textwidth}{$textwidth}\\setlength{\\textheight}{$textheight}\\setlength{\\textfloatsep}{8pt plus 2\.0pt minus 4\.0pt}\n\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\usepackage{fancyhdr}\\addtolength{\\headheight}{\\baselineskip}\n\\pagestyle{fancy}$fancypagestatement\\usepackage{booktabs}\\begin{document}\\voffset=-0\.8 cm\\setcounter{page}{1}\n /; if ($papersize eq 'a4') { $paperwidth = '29.7cm'; - $paperheight = '21cm'; + $paperheight = '21.0cm'; } elsif ($numberofcolumns eq '1') { if ($papersize eq 'letter') { - $paperwidth = '11in'; + $paperwidth = '11.0in'; $paperheight = '8.5in'; } elsif ($papersize eq 'legal') { - $paperwidth = '14in'; + $paperwidth = '14.0in'; $paperheight = '8.5in'; } } @@ -2044,11 +2045,11 @@ sub page_format_transformation { $text =~ s/\\pagestyle\{fancy}\\rhead\{}\\chead\{}\s*\\begin\{document}/\\textheight = $textheight\\oddsidemargin = $evenoffset\n\\evensidemargin = $evenoffset $topmargintoinsert\\textwidth= $textwidth\\newlength{\\minipagewidth}\n\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\pagestyle{fancy}\\rhead{}\\chead{}\\usepackage{booktabs}\\begin{document}\\voffset=-0\.8cm\n\\setcounter{page}{1} \\vskip 5 mm\n /; } if ($papersize eq 'a4') { - $paperwidth = '21cm'; + $paperwidth = '21.0cm'; $paperheight = '29.7cm'; } elsif ($papersize eq 'letter') { $paperwidth = '8.5in'; - $paperheight = '11.5in'; + $paperheight = '11.0in'; } elsif ($papersize eq 'legal') { $paperwidth = '8.5in'; $paperheight = '14.0in'; @@ -3867,7 +3868,7 @@ sub print_resources { if ( !($type eq 'problems' && ($curresline!~ m/$LONCAPA::assess_page_re/)) ) { - if ($print_incomplete && !&incomplete($username, $userdomain, $res_url)) { + if ($print_incomplete && !&incomplete($username, $userdomain, $usersection, $res_url)) { next; } $actually_printed++; # we're going to print one. @@ -4236,7 +4237,6 @@ sub printHelper { } } - } # Detect whether we're coming from construction space