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

www lon-capa-cvs@mail.lon-capa.org
Wed, 09 Feb 2005 15:56:45 -0000


www		Wed Feb  9 10:56:45 2005 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
    /loncom/xml	londefdef.pm 
  Log:
  Bug #3918 for 1.3.3
  Curing the symptoms: non-advanced users can never print non-batchmode.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.358 loncom/interface/lonprintout.pm:1.359
--- loncom/interface/lonprintout.pm:1.358	Mon Feb  7 12:12:46 2005
+++ loncom/interface/lonprintout.pm	Wed Feb  9 10:56:45 2005
@@ -1,7 +1,7 @@
 #  The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.358 2005/02/07 17:12:46 albertel Exp $
+# $Id: lonprintout.pm,v 1.359 2005/02/09 15:56:45 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -698,7 +698,7 @@
 sub print_latex_header {
     my $mode=shift;
     my $output='\documentclass[letterpaper]{article}';
-    if ($mode eq 'batchmode') {
+    if (($mode eq 'batchmode') || (!$ENV{'request.role.adv'})) {
 	$output.='\batchmode';
     }
     $output.='\newcommand{\keephidden}[1]{}\renewcommand{\deg}{$^{\circ}$}'."\n".
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.253 loncom/xml/londefdef.pm:1.254
--- loncom/xml/londefdef.pm:1.253	Wed Feb  9 10:47:06 2005
+++ loncom/xml/londefdef.pm	Wed Feb  9 10:56:45 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.253 2005/02/09 15:47:06 www Exp $
+# $Id: londefdef.pm,v 1.254 2005/02/09 15:56:45 www Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -152,7 +152,8 @@
     } elsif ($target eq 'tex') {
 	@Apache::londefdef::table = ();
 	$currentstring .= '\documentclass[letterpaper]{article}';
-	if ($ENV{'form.latex_type'}=~'batchmode') {$currentstring .='\batchmode';} 
+	if (($ENV{'form.latex_type'}=~'batchmode') ||
+            (!$ENV{'request.role.adv'})) {$currentstring .='\batchmode';} 
 	$currentstring .= '\newcommand{\keephidden}[1]{}'.
                           '\renewcommand{\deg}{$^{\circ}$}'.
                           '\usepackage{longtable}'.