[LON-CAPA-cvs] cvs: rat / map.pm

raeburn raeburn at source.lon-capa.org
Sat Jun 14 15:05:00 EDT 2014


raeburn		Sat Jun 14 19:05:00 2014 EDT

  Modified files:              
    /rat	map.pm 
  Log:
  - Using "multiple" radio and checking "Remove All" in Course Editor results
    in a map containing only zombies, so map::startfinish() needs to add both
    start and finish.
  
  
Index: rat/map.pm
diff -u rat/map.pm:1.14 rat/map.pm:1.15
--- rat/map.pm:1.14	Sat Jul 21 21:20:19 2012
+++ rat/map.pm	Sat Jun 14 19:05:00 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # routines for modyfing .sequence and .page files
 #
-# $Id: map.pm,v 1.14 2012/07/21 21:20:19 raeburn Exp $
+# $Id: map.pm,v 1.15 2014/06/14 19:05:00 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -303,10 +303,14 @@
 	    }
 	}
     }
+# Make sure this has at least start and finish
+    if ($#order==-1) {
+        $resources[&getresidx()]='::false';
+        $order[0]=$#resources;
+    }
 # Put in a start resource
     my ($name,$url,$ext)=split(/\:/,$resources[$order[0]]);
     $resources[$order[0]]=$name.':'.$url.':'.$ext.':start:res';
-# Make sure this has at least start and finish
     if ($#order==0) {
 	$resources[&getresidx()]='::false';
 	$order[1]=$#resources;




More information about the LON-CAPA-cvs mailing list