[LON-CAPA-cvs] cvs: rat /client parameter.html

www lon-capa-cvs@mail.lon-capa.org
Fri, 25 Oct 2002 13:47:37 -0000


www		Fri Oct 25 09:47:37 2002 EDT

  Modified files:              
    /rat/client	parameter.html 
  Log:
  Bug #743, Bug #836
  
  
Index: rat/client/parameter.html
diff -u rat/client/parameter.html:1.18 rat/client/parameter.html:1.19
--- rat/client/parameter.html:1.18	Fri Jun 21 14:28:57 2002
+++ rat/client/parameter.html	Fri Oct 25 09:47:37 2002
@@ -3,7 +3,7 @@
 The LearningOnline Network with CAPA
 Parameter Input Window
 //
-// $Id: parameter.html,v 1.18 2002/06/21 18:28:57 albertel Exp $
+// $Id: parameter.html,v 1.19 2002/10/25 13:47:37 www Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -174,9 +174,15 @@
 
 function year() {
    var thisyear=cdate.getFullYear();
+   var nowdate=new Date();
+   var nowyear=nowdate.getFullYear();
+   var loweryear=thisyear-2;
+   var upperyear=thisyear+5;
+   if (thisyear>nowyear) { loweryear=nowyear-2; }
+   if (thisyear<nowyear) { upperyear=nowyear+5; } 
     var i;
     choicewrite('<select name=year onChange="parent.datecalc();">');
-    for (i=thisyear-25;i<=thisyear+50;i++) {
+    for (i=loweryear;i<=upperyear;i++) {
         choicewrite('<option value='+i);
         if (i==thisyear) {
             choicewrite(' selected');
@@ -428,6 +434,9 @@
    }
 
    if (ptype=='int') {
+      var pscatparts=new Array;
+      pscatparts=pscat.split(',');
+      pscat=pscatparts[0];
       if (pscat=='default') {
          tablestart('Default value or none');
          choicewrite('</table>');