[LON-CAPA-cvs] cvs: loncom /publisher publisher.html

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 05 Sep 2003 02:22:26 -0000


albertel		Thu Sep  4 22:22:26 2003 EDT

  Modified files:              
    /loncom/publisher	publisher.html 
  Log:
  - some of BUG#988, web and pdf have different seeds
  
  - BTW, if anyone has a better sugestion on how to test if the lonhomework form exsts and has a rndseed field, I'd love to know it
  
  
Index: loncom/publisher/publisher.html
diff -u loncom/publisher/publisher.html:1.31 loncom/publisher/publisher.html:1.32
--- loncom/publisher/publisher.html:1.31	Fri Aug  1 16:32:05 2003
+++ loncom/publisher/publisher.html	Thu Sep  4 22:22:25 2003
@@ -70,8 +70,20 @@
   document.del.submit();
 }
 
+function getcurseed() {
+  if (parent.LONCAPAToBePublished.document.lonhomework
+       &&
+      parent.LONCAPAToBePublished.document.lonhomework.rndseed
+       &&
+      parent.LONCAPAToBePublished.document.lonhomework.rndseed.value) {
+    return parent.LONCAPAToBePublished.document.lonhomework.rndseed.value;
+  }
+  return 0;
+}
+
 function getpostdata() {
   document.printout.postdata.value=frameloc();
+  document.printout.curseed.value=getcurseed();
   document.printout.submit();
 }
 </script>
@@ -103,6 +115,7 @@
 		  <form name="printout" target="_parent" action="/adm/printout" target="LONCAPAToBePublished" method="post" onSubmit="getpostdata();">
 		    <td rowspan="2" bgcolor="#ccddaa" align="center">
 		      <input type="hidden" name="postdata" value="" />
+		      <input type="hidden" name="curseed" value="" />
 		      <input type="button" value="Print" onClick="getpostdata();" />
 		    </td>
 		  </form>