[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 15 Jan 2004 20:06:19 -0000
albertel Thu Jan 15 15:06:19 2004 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
- better fix to BUG#2566, lonnet::gettitle knows all the places to look for the title in the correct order, caches and knows about the : it's your friend. :-)
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.268 loncom/interface/lonprintout.pm:1.269
--- loncom/interface/lonprintout.pm:1.268 Thu Jan 15 11:38:48 2004
+++ loncom/interface/lonprintout.pm Thu Jan 15 15:06:19 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.268 2004/01/15 16:38:48 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.269 2004/01/15 20:06:19 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -86,7 +86,7 @@
$result =~ s/&\#0?55;/7/g;
$result =~ s/&\#0?56;/8/g;
$result =~ s/&\#0?57;/9/g;
- $result =~ s/&(\#0?58|colon);/:/g;
+ $result =~ s/&\#0?58;/:/g;
$result =~ s/&\#0?59;/;/g;
$result =~ s/&(\#0?60|lt|\#139);/\$<\$/g;
$result =~ s/&\#0?61;/\$=\$/g;
@@ -474,7 +474,6 @@
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,20 +515,16 @@
sub details_for_menu {
- my $name_of_resourse = $hash{'title_'.$hash{'ids_'.$ENV{'form.postdata'}}};
- $name_of_resourse=&character_chart($name_of_resourse);
+ my $name_of_resourse = &Apache::lonnet::gettitle($ENV{'form.postdata'});
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);
+ my $name_of_sequence = &Apache::lonnet::gettitle($map);
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);
+ my $name_of_map = &Apache::lonnet::gettitle($ENV{'request.course.uri'});
if ($name_of_map =~ /^\s*$/) {
$ENV{'request.course.uri'} =~ m|([^/]+)$|;
$name_of_map = $1;
@@ -892,7 +887,6 @@
}
$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;}
@@ -1016,7 +1010,6 @@
}
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 /;