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

www lon-capa-cvs@mail.lon-capa.org
Tue, 25 Feb 2003 14:42:02 -0000


www		Tue Feb 25 09:42:02 2003 EDT

  Modified files:              
    /rat/client	code.html 
  Log:
  Bugs #1249, #1250
  Parameters to the same resource in objparms kept appending every time 
  finishload() was called, which was sort of intentional for ease of coding, 
  and no problem whatsoever for small maps. Blew up for large maps.
  
  
Index: rat/client/code.html
diff -u rat/client/code.html:1.63 rat/client/code.html:1.64
--- rat/client/code.html:1.63	Mon Feb  3 13:03:53 2003
+++ rat/client/code.html	Tue Feb 25 09:42:02 2003
@@ -4,7 +4,7 @@
 The LearningOnline Network
 Resource Assembly Tool
 //
-// $Id: code.html,v 1.63 2003/02/03 18:03:53 harris41 Exp $
+// $Id: code.html,v 1.64 2003/02/25 14:42:02 www Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -2564,6 +2564,8 @@
    objcont.length=0;
    for (k=0;k<objlinks.length;k++) { objlinks[k]=''; }
    objlinks.length=0;
+   for (k=0;k<objparms.length;k++) { objparms[k]=''; }
+   objparms.length=0;
    objlinks[0]='';
    objcont[0]='';
    editmode=0;
@@ -2586,7 +2588,11 @@
           if (typeof(objparms[data2[1]])=="undefined") {
              objparms[data2[1]]=data2[2];
           } else {
-             objparms[data2[1]]+=':'+data2[2];
+             if (objparms[data2[2]]=='') {
+                 objparms[data2[1]]=data2[2];
+             } else {
+                 objparms[data2[1]]+=':'+data2[2];
+             }
           }
        }
        if (data2[0]=='rowcont') { rowcont[data2[1]]=data2[2]; }