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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 11 Aug 2005 21:31:50 -0000


albertel		Thu Aug 11 17:31:50 2005 EDT

  Modified files:              
    /rat/client	parameter.html 
  Log:
  - bug # 4273, couldn't set start and end dates for roles in createuser beacuse cdate was being created with invalid data (namely undefined values)
  
  
Index: rat/client/parameter.html
diff -u rat/client/parameter.html:1.33 rat/client/parameter.html:1.34
--- rat/client/parameter.html:1.33	Thu Jul  7 15:00:31 2005
+++ rat/client/parameter.html	Thu Aug 11 17:31:46 2005
@@ -3,7 +3,7 @@
 The LearningOnline Network with CAPA
 Parameter Input Window
 //
-// $Id: parameter.html,v 1.33 2005/07/07 19:00:31 albertel Exp $
+// $Id: parameter.html,v 1.34 2005/08/11 21:31:46 albertel Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -731,9 +731,11 @@
      if (pair[0]=='call') { pcode=pair[1]; }
      if (pair[0]=='marker') { pmarker=pair[1]; }
      if (pair[0]=='name') { pname=pair[1]; }
-     if (pair[0]=='defhour') { defhour=pair[1]; }
-     if (pair[0]=='defmin') { defmin=pair[1]; }
-     if (pair[0]=='defsec') { defsec=pair[1]; }
+     if (pair[0]=='defhour' && pair[1] >= 0 && pair[1] < 24 ) {
+         defhour=pair[1];
+     }
+     if (pair[0]=='defmin' && pair[1] >= 0 && pair[1] < 60) { defmin=pair[1]; }
+     if (pair[0]=='defsec' && pair[1] >= 0 && pair[1] < 60) { defsec=pair[1]; }
   }
 
   svalue=pvalue;