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

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 11 Feb 2006 00:03:09 -0000


albertel		Fri Feb 10 19:03:09 2006 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - don't genrate the 'username' form parm unless we need it
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.333 loncom/homework/structuretags.pm:1.334
--- loncom/homework/structuretags.pm:1.333	Fri Feb 10 18:44:53 2006
+++ loncom/homework/structuretags.pm	Fri Feb 10 19:03:07 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.333 2006/02/10 23:44:53 albertel Exp $
+# $Id: structuretags.pm,v 1.334 2006/02/11 00:03:07 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -622,9 +622,12 @@
 	    $form_tag_start.='<input type="hidden" name="rndseed" value="'.
 		$rndseed.'" />'.
 		    '<input type="submit" name="resetdata"
-                             value="'.&mt('New Problem Variation').'" />'.
+                             value="'.&mt('New Problem Variation').'" />';
+	    if (exists($env{'form.username'})) {
+		$form_tag_start.=
 		    '<input type="hidden" name="username"
                              value="'.$env{'form.username'}.'" />';
+	    }
 	    if ($env{'request.role.adv'}) {
 		$form_tag_start.=
 		    ' <label><input type="checkbox" name="showallfoils" ';