[LON-CAPA-cvs] cvs: loncom /homework grades.pm /xml londefdef.pm lontex.pm lontexconvert.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 17 May 2006 22:08:18 -0000


albertel		Wed May 17 18:08:18 2006 EDT

  Modified files:              
    /loncom/xml	londefdef.pm lontexconvert.pm lontex.pm 
    /loncom/homework	grades.pm 
  Log:
  - calling init_tth from start_page (effectively)
  - reducing dependencies from lontextconvert.pm
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.328 loncom/xml/londefdef.pm:1.329
--- loncom/xml/londefdef.pm:1.328	Wed Apr 19 22:08:15 2006
+++ loncom/xml/londefdef.pm	Wed May 17 18:08:08 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.328 2006/04/20 02:08:15 albertel Exp $
+# $Id: londefdef.pm,v 1.329 2006/05/17 22:08:08 albertel Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -180,7 +180,6 @@
 sub start_html {
     my ($target,$token) = @_;
     my $currentstring = '';
-    &Apache::lontexconvert::init_tth();
     if ($target eq 'web' || $target eq 'edit' || $target eq 'webgrade' ) {
 	# start_body() takes care of emitting the <html> 
     } elsif ($target eq 'tex') {
Index: loncom/xml/lontexconvert.pm
diff -u loncom/xml/lontexconvert.pm:1.72 loncom/xml/lontexconvert.pm:1.73
--- loncom/xml/lontexconvert.pm:1.72	Tue Apr 11 14:42:43 2006
+++ loncom/xml/lontexconvert.pm	Wed May 17 18:08:08 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # TeX Conversion Module
 #
-# $Id: lontexconvert.pm,v 1.72 2006/04/11 18:42:43 albertel Exp $
+# $Id: lontexconvert.pm,v 1.73 2006/05/17 22:08:08 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -42,9 +42,7 @@
 use strict;
 use tth();
 use vars qw($errorstring);
-use Apache::lonmsg();
-use Apache::lonxml();
-use Apache::lonmenu();
+#use Apache::lonxml();
 use Apache::lonlocal;
 use Apache::lonnet;
 
@@ -190,6 +188,7 @@
 }
 
 sub init_math_support {
+    &init_tth();
     &Apache::lontexconvert::jsMath_reset();
     if ($env{'environment.texengine'} eq 'jsMath' ||
 	$env{'form.texengine'}        eq 'jsMath' ) {
Index: loncom/xml/lontex.pm
diff -u loncom/xml/lontex.pm:1.11 loncom/xml/lontex.pm:1.12
--- loncom/xml/lontex.pm:1.11	Wed Apr 19 22:06:35 2006
+++ loncom/xml/lontex.pm	Wed May 17 18:08:08 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # TeX Content Handler
 #
-# $Id: lontex.pm,v 1.11 2006/04/20 02:06:35 albertel Exp $
+# $Id: lontex.pm,v 1.12 2006/05/17 22:08:08 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -96,8 +96,6 @@
 					  ['texengine','inhibitmenu']);
 
 
-  &Apache::lontexconvert::init_tth();
-
   $r->print(&Apache::loncommon::start_page(undef,undef,
 					   {'bgcolor'        => '#FFFFFF',
 					    'force_register' => 1,
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.352 loncom/homework/grades.pm:1.353
--- loncom/homework/grades.pm:1.352	Tue Apr 11 16:55:50 2006
+++ loncom/homework/grades.pm	Wed May 17 18:08:17 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.352 2006/04/11 20:55:50 albertel Exp $
+# $Id: grades.pm,v 1.353 2006/05/17 22:08:17 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5935,7 +5935,7 @@
     if ($#commands > 0) {
 	&Apache::lonnet::logthis("grades got multiple commands ".join(':',@commands));
     }
-    &send_header($request);
+    $request->print(&Apache::loncommon::start_page('Grading'));
     if ($symb eq '' && $command eq '') {
 	if ($env{'user.adv'}) {
 	    if (($env{'form.codeone'}) && ($env{'form.codetwo'}) &&
@@ -6026,20 +6026,8 @@
 	    $request->print("Access Denied ($command)");
 	}
     }
-    &send_footer($request);
-    return '';
-}
-
-sub send_header {
-    my ($request)= @_;
-    &Apache::lontexconvert::init_tth();
-    $request->print(&Apache::loncommon::start_page('Grading'));
-    $request->rflush();
-}
-
-sub send_footer {
-    my ($request)= @_;
     $request->print(&Apache::loncommon::end_page());
+    return '';
 }
 
 1;