static function fetchAllObjectives($a_slm_object, $a_tree_node_id) { global $ilDB; $objectives = array(); $seq_item = new ilSCORM2004Item($a_tree_node_id); $xpath_obj = new DOMXPath($seq_item->dom); $obj_node_list = $xpath_obj->query('//objective | //primaryObjective'); for ($i = 0; $i < $obj_node_list->length; $i++) { $obj = new ilSCORM2004Objective(); $obj->setNode($obj_node_list->item($i)); $mapping_node_list = $xpath_obj->query('//objective | //primaryObjective'); //check for mapping array_push($objectives, $obj); } return $objectives; }