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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 09 Sep 2002 21:08:31 -0000


albertel		Mon Sep  9 17:08:31 2002 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - added more checks for tex mode
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.112 loncom/homework/structuretags.pm:1.113
--- loncom/homework/structuretags.pm:1.112	Wed Sep  4 23:30:27 2002
+++ loncom/homework/structuretags.pm	Mon Sep  9 17:08:31 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.112 2002/09/05 03:30:27 albertel Exp $
+# $Id: structuretags.pm,v 1.113 2002/09/09 21:08:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -490,7 +490,7 @@
 sub start_block {
   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
 
-  if ($target eq 'web' || $target eq 'grade' || $target eq 'answer') {
+  if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') {
     my $code = @$parstack[$#$parstack];
     $code =~ s/\"//g;
     $code .=';return $condition;';
@@ -668,7 +668,7 @@
 
 sub start_preduedate {
   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
-  if ($target eq 'web' || $target eq 'grade' || $target eq 'answer') {
+  if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') {
     if ($Apache::inputtags::status['-1'] ne 'CAN_ANSWER' &&
 	$Apache::inputtags::status['-1'] ne 'CANNOT_ANSWER' ) {
       &Apache::lonxml::get_all_text("/preduedate",$$parser[$#$parser]);
@@ -683,7 +683,7 @@
 
 sub start_postanswerdate {
   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
-  if ($target eq 'web' || $target eq 'grade') {
+  if ($target eq 'web' || $target eq 'grade' || $target eq 'tex') {
     if ($Apache::inputtags::status['-1'] ne 'SHOW_ANSWER') {
       &Apache::lonxml::get_all_text("/postanswerdate",$$parser[$#$parser]);
     }
@@ -699,7 +699,7 @@
 
 sub start_notsolved {
   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
-  if ($target eq 'web' || $target eq 'grade' || $target eq 'answer') {
+  if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') {
     my $gradestatus=$Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"};
     &Apache::lonxml::debug("not solved has :$gradestatus:");
     if ($gradestatus =~ /^correct/) {
@@ -716,7 +716,7 @@
 
 sub start_solved {
   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
-  if ($target eq 'web' || $target eq 'grade' || $target eq 'answer') {
+  if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') {
     my $gradestatus=$Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"};
     if ($gradestatus !~ /^correct/) {
       &Apache::lonxml::get_all_text("/solved",$$parser[$#$parser]);