コード例 #1
0
 /**
  * Create sco
  */
 function create($a_upload = false, $a_template = false)
 {
     global $ilDB;
     parent::create($a_upload, $a_template);
     if (!$a_template) {
         $obj = new ilSCORM2004Objective($this->getId());
         //			$obj->setObjectiveID("Objective SCO ".$this->getId());
         $obj->setId("local_obj_" . $this->getID() . "_0");
         $obj->update();
     }
     $ilDB->manipulate("INSERT INTO sahs_sc13_sco " . "(id, hide_obj_page) VALUES (" . $ilDB->quote($this->getId(), "integer") . "," . $ilDB->quote($this->getHideObjectivePage(), "integer") . ")");
 }
コード例 #2
0
 public function getObjectives()
 {
     include_once "./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Objective.php";
     return ilSCORM2004Objective::fetchAllObjectives($this->slm_object, $this->getId());
 }
コード例 #3
0
 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;
 }