[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm

sakharuk lon-capa-cvs@mail.lon-capa.org
Tue, 01 Oct 2002 21:04:34 -0000


sakharuk		Tue Oct  1 17:04:34 2002 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  Cleanup done woth part coupled with inputtags.pm.
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.120 loncom/homework/structuretags.pm:1.121
--- loncom/homework/structuretags.pm:1.120	Tue Oct  1 16:44:44 2002
+++ loncom/homework/structuretags.pm	Tue Oct  1 17:04:34 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.120 2002/10/01 20:44:44 sakharuk Exp $
+# $Id: structuretags.pm,v 1.121 2002/10/01 21:04:34 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -434,21 +434,6 @@
   return $result;
 }
 
-#FIXME I am ugly shoot me
-sub html_to_tex {
-  my ($string)=@_;
-  $string =~ s/<table>//;
-  $string =~ s/<\/table>//;
-  $string =~ s/<tr([^>]*)>//g;
-  $string =~ s/<\/tr>//g;
-  $string =~ s/<td([^>]*)>//g;
-  $string =~ s/<\/td>//g;
-  $string =~ s/<b>/\\textbf{/g;
-  $string =~ s/<\/b>/}/g;
-  $string =~ s/<br \/>/\\vskip 0 mm /g;
-  $string =~ s/<input([^>]*)>//g;
-  return $string;
-}
 
 sub start_library {
   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
@@ -661,9 +646,7 @@
     return &Apache::inputtags::grade;
   }
   if ($target eq 'web' || $target eq 'tex' ) {
-    my $gradestatus=&Apache::inputtags::gradestatus($Apache::inputtags::part);
-    #FIXME this is ugly we should just generate tex in inputtags
-    if ($target eq 'tex') { $gradestatus=&html_to_tex($gradestatus); }
+    my $gradestatus=&Apache::inputtags::gradestatus($Apache::inputtags::part,$target);
     if ($Apache::lonhomework::type eq 'exam') {$gradestatus='';}
     return $gradestatus;
   }