--- loncom/interface/lonprintout.pm 2003/11/11 19:32:22 1.265
+++ loncom/interface/lonprintout.pm 2004/01/15 16:38:48 1.268
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.265 2003/11/11 19:32:22 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.268 2004/01/15 16:38:48 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -86,7 +86,7 @@ sub character_chart {
$result =~ s/&\#0?55;/7/g;
$result =~ s/&\#0?56;/8/g;
$result =~ s/&\#0?57;/9/g;
- $result =~ s/&\#0?58;/:/g;
+ $result =~ s/&(\#0?58|colon);/:/g;
$result =~ s/&\#0?59;/;/g;
$result =~ s/&(\#0?60|lt|\#139);/\$<\$/g;
$result =~ s/&\#0?61;/\$=\$/g;
@@ -474,6 +474,7 @@ sub get_course {
sub page_format_transformation {
my ($papersize,$layout,$numberofcolumns,$choice,$text,$assignment,$tableofcontents,$indexlist) = @_;
my ($textwidth,$textheight,$oddoffset,$evenoffset,$topmargin);
+ $assignment=&character_chart($assignment);
$assignment=&Apache::lonxml::latex_special_symbols($assignment,'header');
($textwidth,$textheight,$oddoffset,$evenoffset,$topmargin) = &page_format($papersize,$layout,$numberofcolumns,$topmargin);
my $name = &get_name();
@@ -516,16 +517,19 @@ sub page_cleanup {
sub details_for_menu {
my $name_of_resourse = $hash{'title_'.$hash{'ids_'.$ENV{'form.postdata'}}};
+ $name_of_resourse=&character_chart($name_of_resourse);
my $symbolic = &Apache::lonnet::symbread($ENV{'form.postdata'});
my ($map,$id,$resource)=&Apache::lonnet::decode_symb($symbolic);
$map=&Apache::lonnet::clutter($map);
my $name_of_sequence;
$name_of_sequence = $hash{'title_'.$hash{'ids_'.$map}};
+ $name_of_sequence=&character_chart($name_of_sequence);
if ($name_of_sequence =~ /^\s*$/) {
$map =~ m|([^/]+)$|;
$name_of_sequence = $1;
}
my $name_of_map = $hash{'title_'.$hash{'ids_'.&Apache::lonnet::clutter($ENV{'request.course.uri'})}};
+ $name_of_map=&character_chart($name_of_map);
if ($name_of_map =~ /^\s*$/) {
$ENV{'request.course.uri'} =~ m|([^/]+)$|;
$name_of_map = $1;
@@ -888,7 +892,9 @@ ENDPART
}
$form{'symb'}=$master_seq[$i];
my ($sequence)=&Apache::lonnet::decode_symb($master_seq[$i]);
+ $assignment=&character_chart($assignment);
my $assignment=&Apache::lonxml::latex_special_symbols(&Apache::lonnet::gettitle($sequence),'header'); #tittle of the assignment which contains this problem
+ if ($selectionmade==7) {$helper->{VARS}->{'assignment'}=$assignment;}
if ($i==0) {$prevassignment=$assignment;}
#&Apache::lonnet::logthis("Trying to get $urlp with symb $master_seq[$i]");
my $texversion.=&Apache::lonnet::ssi($urlp,%form);
@@ -1010,6 +1016,7 @@ ENDPART
}
my $courseidinfo = &get_course();
if (defined($courseidinfo)) { $courseidinfo=' - '.$courseidinfo }
+ $assignment=&character_chart($assignment);
my $currentassignment=&Apache::lonxml::latex_special_symbols($helper->{VARS}->{'assignment'},'header');
if ($current_output=~/\\documentclass/) {
$current_output =~ s/\\begin{document}/\\setlength{\\topmargin}{1cm} \\begin{document}\\noindent\\lhead{\\textit{\\textbf{$fullname}}$courseidinfo \\hfill \\thepage \\\\ \\textit{$currentassignment}}\\vskip 3 mm /;
@@ -1641,6 +1648,7 @@ use Apache::lonhelper;
no strict;
@ISA = ("Apache::lonhelper::element");
use strict;
+use Apache::lonlocal;
my $maxColumns = 2;
my @paperSize = ("Letter [8 1/2x11 in]", "Legal [8 1/2x14 in]",
@@ -1668,15 +1676,17 @@ sub render {
my $helper = Apache::lonhelper::getHelper();
my $result = '';
my $var = $self->{'variable'};
-
+ my $PageLayout=&mt('Page layout');
+ my $NumberOfColumns=&mt('Number of columns');
+ my $PaperType=&mt('Paper type');
$result .= <
Page layout | -Number of columns | -Paper type | +$PageLayout | +$NumberOfColumns | +$PaperType |