00001 <?php 00002 //Code to be executed before the end activity 00003 // If we didn't retrieve the instance before 00004 if(empty($instance->instanceId)) { 00005 // This activity needs an instance to be passed to 00006 // be started, so get the instance into $instance. 00007 if(isset($_REQUEST['iid'])) { 00008 $instance->getInstance($_REQUEST['iid']); 00009 } else { 00010 // defined in lib/Galaxia/config.php 00011 galaxia_show_error("No instance indicated"); 00012 die; 00013 } 00014 } 00015 // Set the current user for this activity 00016 if(isset($user) && !empty($instance->instanceId) && !empty($activity->activityId)) { 00017 $instance->setActivityUser($activity->activityId,$user); 00018 } 00019 00020 ?>