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

raeburn raeburn at source.lon-capa.org
Mon Feb 17 11:40:22 EST 2014


raeburn		Mon Feb 17 16:40:22 2014 EDT

  Modified files:              
    /loncom/interface	lonwishlist.pm 
  Log:
  - Catch Javascript error when $fnum (number of items in wishlist.db less 1,
    for "root" ) exceeds number of checkboxes.
  
  
Index: loncom/interface/lonwishlist.pm
diff -u loncom/interface/lonwishlist.pm:1.19 loncom/interface/lonwishlist.pm:1.20
--- loncom/interface/lonwishlist.pm:1.19	Wed Jan 29 16:25:44 2014
+++ loncom/interface/lonwishlist.pm	Mon Feb 17 16:40:22 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Utility-routines for wishlist
 #
-# $Id: lonwishlist.pm,v 1.19 2014/01/29 16:25:44 bisitz Exp $
+# $Id: lonwishlist.pm,v 1.20 2014/02/17 16:40:22 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1042,6 +1042,12 @@
         function finish_import() {
             opener.document.forms.simpleedit.importdetail.value='';
             for (var num = 0; num < document.forms.groupsort.fnum.value; num++) {
+                try {
+                    eval("document.forms.groupsort.filelink"+num+".value");
+                }
+                catch(err) {
+                   continue;
+                }
                 if (eval("document.forms.groupsort.check"+num+".checked") && eval("document.forms.groupsort.filelink"+num+".value") != '') {
                     opener.document.forms.simpleedit.importdetail.value+='&'+
                     eval("document.forms.groupsort.title"+num+".value")+'='+




More information about the LON-CAPA-cvs mailing list