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

sakharuk lon-capa-cvs@mail.lon-capa.org
Thu, 15 Jan 2004 16:38:49 -0000


sakharuk		Thu Jan 15 11:38:49 2004 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Fixed bug 2566 (the due date on assignment misinterprets the colon). DOCS uses nonstandard HTML entity : and nobody had informed me about this. 
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.267 loncom/interface/lonprintout.pm:1.268
--- loncom/interface/lonprintout.pm:1.267	Mon Jan 12 16:53:27 2004
+++ loncom/interface/lonprintout.pm	Thu Jan 15 11:38:48 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.267 2004/01/12 21:53:27 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 @@
     $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 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 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,6 +892,7 @@
 	    }
 	    $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;}
@@ -1011,6 +1016,7 @@
 	    }
 	    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 /;