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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 23 May 2006 19:05:42 -0000


albertel		Tue May 23 15:05:42 2006 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - BUG$4764, include the symb in the homework form submission so we always get the correct problem
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.354 loncom/homework/structuretags.pm:1.355
--- loncom/homework/structuretags.pm:1.354	Fri Apr 28 14:34:22 2006
+++ loncom/homework/structuretags.pm	Tue May 23 15:05:42 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.354 2006/04/28 18:34:22 albertel Exp $
+# $Id: structuretags.pm,v 1.355 2006/05/23 19:05:42 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -160,6 +160,14 @@
 	    $form_tag_start.=&Apache::edit::form_change_detection();
 	}
 	$form_tag_start.='>';
+
+	my $symb=&Apache::lonnet::symbread();
+	if ($symb =~ /\S/) {
+	    $symb=
+		&HTML::Entities::encode(&Apache::lonenc::check_encrypt($symb));
+	    $form_tag_start.=
+		'<input type="hidden" name="symb" value="'.$symb.'" />';
+	}
     }
     return ($page_start,$form_tag_start);
 }