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

sakharuk lon-capa-cvs@mail.lon-capa.org
Mon, 03 May 2004 17:51:11 -0000


sakharuk		Mon May  3 13:51:11 2004 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Changes to print syllabus as separate resourcew.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.297 loncom/interface/lonprintout.pm:1.298
--- loncom/interface/lonprintout.pm:1.297	Fri Apr 30 13:50:29 2004
+++ loncom/interface/lonprintout.pm	Mon May  3 13:51:11 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.297 2004/04/30 17:50:29 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.298 2004/05/03 17:51:11 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -676,7 +676,7 @@
 sub unsupported {
     my $currentURL=shift;
     my $result.='\documentclass[letterpaper]{article}\usepackage{calc}\begin{document}Printout of this type of document is currently not supported: ';
-    if ($currentURL=~/\/(aboutme|syllabus|bulletinboard|smppg)$/) {
+    if ($currentURL=~/\/(aboutme|syllabus|bulletinboard)$/) {
 	$result.='\textbf{'.$1.'}';
     } elsif ($currentURL=~/\/ext\//) {
 	$result.=' \strut \\\\ THIS IS EXTERNAL RESOURCE WITH URL \strut \\\\ '.$currentURL.' ';
@@ -754,6 +754,7 @@
 	}
 	$selectionmade = 1;
 	if ($currentURL=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) {
+	    &Apache::lonnet::logthis("II AMAM IN A WRONG PLACE");
 	    my $rndseed=time;
 	    my $texversion='';
 	    if ($helper->{'VARS'}->{'ANSWER_TYPE'} ne 'only') {
@@ -876,14 +877,16 @@
 	    }
 	    if ($helper->{VARS}->{'construction'} eq '1') {$result=~s/(\\begin{document})/$1 \\fbox\{RANDOM SEED IS $rndseed\} /;}
 	    $result .= '\end{document}';   
-	} elsif ($currentURL=~/\/smppg$/) { 
+	} elsif ($currentURL=~/\/(smppg|syllabus)$/) { 
 		my %form;
 		$form{'grade_target'}='tex';
 		$form{'textwidth'}=&get_textwidth($helper,$LaTeXwidth);
 		$form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
+		if ($currentURL=~/\/syllabus$/) {$currentURL=~s/\/res//;}
 		my $texversion=&Apache::lonnet::ssi($currentURL,%form);
 		$result .= $texversion;
 	} else {
+	    &Apache::lonnet::logthis("IIII AMAM IN A WRONG PLACE");
 	    $result.=&unsupported($currentURL);
 	}
     } elsif (($helper->{'VARS'}->{'PRINT_TYPE'} eq 'map_problems') or