[LON-CAPA-cvs] cvs: loncom /interface lonfeedback.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 09 May 2006 20:38:45 -0000


albertel		Tue May  9 16:38:45 2006 EDT

  Modified files:              
    /loncom/interface	lonfeedback.pm 
  Log:
  - this seems lika better idea
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.198 loncom/interface/lonfeedback.pm:1.199
--- loncom/interface/lonfeedback.pm:1.198	Tue May  9 16:00:44 2006
+++ loncom/interface/lonfeedback.pm	Tue May  9 16:38:45 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.198 2006/05/09 20:00:44 albertel Exp $
+# $Id: lonfeedback.pm,v 1.199 2006/05/09 20:38:45 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1328,11 +1328,11 @@
   my $attachnum = 0;
   my $anonchk = (<<END);
   function anonchk() {
-      if (document.mailform.discuss[0].checked) {
-	  document.attachment.discuss.value = 'nonanon';
-      }
-      if (document.mailform.discuss[1].checked) {
-	  document.attachment.discuss.value = 'anon';
+      for (var i=0; i < document.mailform.discuss.length; i++) {
+	  if (document.mailform.discuss[i].checked) {
+	      document.attachment.discuss.value = 
+		  document.mailform.discuss[i].value;
+	  }
       }
       if (document.mailform.blog.checked) {
 	  document.attachment.blog.value = 1;
@@ -1345,11 +1345,10 @@
       $anonscript = (<<END);
   function setposttype() {
       var disc = "$env{'form.discuss'}";
-      if (disc == 'nonanon') {
-          document.mailform.discuss[0].checked=1;
-      }
-      if (disc == 'anon') {
-          document.mailform.discuss[1].checked=1;
+      for (var i=0; i < document.mailform.discuss.length; i++) {
+	  if (disc == document.mailform.discuss[i].value) {
+	      document.mailform.discuss[i].checked = 1;
+	  }
       }
       var blog = "$env{'form.blog'}";
       if (blog == 1) {