[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm

sakharuk lon-capa-cvs@mail.lon-capa.org
Wed, 12 Feb 2003 20:44:38 -0000


sakharuk		Wed Feb 12 15:44:38 2003 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Additional and (I agree here with Guy) not neccesary latex cleanup subroutine was removed. An appropriate subroutine from lonxml.pm is used istead of one.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.112 loncom/interface/lonprintout.pm:1.113
--- loncom/interface/lonprintout.pm:1.112	Fri Feb  7 14:47:48 2003
+++ loncom/interface/lonprintout.pm	Wed Feb 12 15:44:38 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.112 2003/02/07 19:47:48 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.113 2003/02/12 20:44:38 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1200,9 +1200,9 @@
 	} else {
 	  ($textwidth,$textheight,$oddoffset,$evenoffset) = ($ENV{'form.width'},$ENV{'form.height'},$ENV{'form.leftmargin'},$ENV{'form.leftmargin'});
 	}
-    my $firstname = &special_character_corrections(&Apache::lonnet::unescape($ENV{'environment.firstname'}));
-    my $lastname = &special_character_corrections(&Apache::lonnet::unescape($ENV{'environment.lastname'}));
-    my $courseidinfo = &special_character_corrections(&Apache::lonnet::unescape($ENV{'course.'.$ENV{'request.course.id'}.'.description'}));
+    my $firstname = &Apache::lonxml::latex_special_symbols(&Apache::lonnet::unescape($ENV{'environment.firstname'}),'','','header');
+    my $lastname = &Apache::lonxml::latex_special_symbols(&Apache::lonnet::unescape($ENV{'environment.lastname'}),'','','header');
+    my $courseidinfo = &Apache::lonxml::latex_special_symbols(&Apache::lonnet::unescape($ENV{'course.'.$ENV{'request.course.id'}.'.description'}),'','','header');
     if ($layout eq 'CBI') {
 	    $text =~ s/\\begin{document}/\\setlength{\\oddsidemargin}{$oddoffset}\\setlength{\\evensidemargin}{$evenoffset}\\setlength{\\topmargin}{200pt}\\setlength{\\textwidth}{$textwidth}\\setlength{\\textheight}{$textheight}\\setlength{\\parindent}{20pt}\\setlength{\\marginparwidth}{90pt}\\setlength{\\textfloatsep}{8pt plus 2\.0pt minus 4\.0pt}\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm} \\begin{document}\\setcounter{page}{1}\\noindent\\parbox{\\minipagewidth}{\\noindent\\fbox{\\textbf{$firstname $lastname}} \\hfill  $courseidinfo} \\vskip 5 mm /;
     } elsif ($layout eq 'CAPA') {
@@ -1252,15 +1252,6 @@
     }  
     return ($name_of_resourse,$name_of_sequence,$name_of_map);
 
-}
-
-
-sub special_character_corrections {
-    my $argument = shift;
-    $argument =~ s/_/ /g;
-    $argument =~ s/\^/ /g;
-    $argument =~ s/&/\\&/g;
-    return $argument;
 }