[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm /interface loncommon.pm /xml londefdef.pm

raeburn raeburn at source.lon-capa.org
Thu May 15 16:20:54 EDT 2014


raeburn		Thu May 15 20:20:54 2014 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
    /loncom/xml	londefdef.pm 
    /loncom/interface	loncommon.pm 
  Log:
  - Efficiency. 
    Only call &printsuppression() from loncommon::headtag() to check if
    printing is disabled, for cases where that might apply.
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.517 loncom/homework/structuretags.pm:1.518
--- loncom/homework/structuretags.pm:1.517	Fri Feb 28 19:19:46 2014
+++ loncom/homework/structuretags.pm	Thu May 15 20:17:17 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.517 2014/02/28 19:19:46 bisitz Exp $
+# $Id: structuretags.pm,v 1.518 2014/05/15 20:17:17 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -414,6 +414,8 @@
         $body_args{'add_entries'}    = \%add_entries;
         if ( $env{'request.state'} eq   'construct') {
             $body_args{'only_body'}  = 1;
+        } elsif ($target eq 'web') {
+            $body_args{'print_suppress'} = 1;
         }
     }
     $body_args{'no_auto_mt_title'} = 1;
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.450 loncom/xml/londefdef.pm:1.451
--- loncom/xml/londefdef.pm:1.450	Mon Oct 14 17:11:18 2013
+++ loncom/xml/londefdef.pm	Thu May 15 20:19:06 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.450 2013/10/14 17:11:18 raeburn Exp $
+# $Id: londefdef.pm,v 1.451 2014/05/15 20:19:06 raeburn Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -585,14 +585,15 @@
         # FIXME Where are we?
     }
 
+        my $args = {'add_entries'    => $token->[2],
+                    'force_register' => 1,};
+        if ($target eq 'web') {
+            $args->{'print_suppress'} = 1;
+        }
 	$currentstring = 
 	    &Apache::loncommon::start_page($Apache::londefdef::title,
 					   $Apache::londefdef::head
-					      .$extra_head,
-					   {'add_entries'    => $token->[2],
-#					    'no_title'       => 1,
-					    'force_register' => 1});
-
+					      .$extra_head,$args);
         my $header = '';
         if ($env{'request.state'} ne 'published' &&
             $env{'request.state'} ne 'construct') {
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1187 loncom/interface/loncommon.pm:1.1188
--- loncom/interface/loncommon.pm:1.1187	Fri Apr 25 17:56:43 2014
+++ loncom/interface/loncommon.pm	Thu May 15 20:20:54 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1187 2014/04/25 17:56:43 bisitz Exp $
+# $Id: loncommon.pm,v 1.1188 2014/05/15 20:20:54 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7304,7 +7304,10 @@
 	'<head>'.
 	&font_settings($args);
 
-    my $inhibitprint = &print_suppression();
+    my $inhibitprint;
+    if ($args->{'print_suppress'}) {
+        $inhibitprint = &print_suppression();
+    }
 
     if (!$args->{'frameset'}) {
 	$result .= &Apache::lonhtmlcommon::htmlareaheaders();




More information about the LON-CAPA-cvs mailing list