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

foxr lon-capa-cvs@mail.lon-capa.org
Thu, 03 Nov 2005 11:32:00 -0000


foxr		Thu Nov  3 06:32:00 2005 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  For target 'tex' do <problem></problem> within a redirect so that we can
  later edit the due dates as needed.
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.308 loncom/homework/structuretags.pm:1.309
--- loncom/homework/structuretags.pm:1.308	Thu Nov  3 06:10:25 2005
+++ loncom/homework/structuretags.pm	Thu Nov  3 06:32:00 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.308 2005/11/03 11:10:25 foxr Exp $
+# $Id: structuretags.pm,v 1.309 2005/11/03 11:32:00 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -693,7 +693,7 @@
 	    # The big change; Due do the comparison on 
 	    # the absolute time rather than textual time since that is format independent.
 	    #
-	    if ($due_file_content ne $duetime) {
+	    if ($due_file_content != $duetime) {
 		$temp_file = Apache::File->new('>'.$filename);
 		print $temp_file "$duetime\n";
 		if (not $env{'request.symb'} =~ m/\.page_/) {
@@ -716,6 +716,7 @@
 		}
 	    }
 	}
+	&Apache::lonxml::startredirection; # We'll do redirection to deal with duedates.
     } elsif ($target eq 'edit') {
 	$result.=$head_tag_start."</head>".$body_tag_start.$form_tag_start.
 	    &problem_edit_header();
@@ -736,6 +737,9 @@
 sub end_problem {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
     my $result='';
+    if ($target eq 'tex') {
+	$result = &Apache::lonxml::endredirection;
+    }
     my $status=$Apache::inputtags::status['-1'];
     if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' ||
 	$target eq 'tex') {