15 require_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
16 require_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004MapInfo.php");
44 if ($a_obj_id !=null && $a_treeid != null) {
45 $xpath_obj =
new DOMXPath($this->dom);
46 $obj_node_list = $xpath_obj->query(
'//objective[@objectiveID = "'.$a_obj_id.
'"] | '.
47 '//primaryObjective[@objectiveID = "'.$a_obj_id.
'"]');
48 $this->
setNode($obj_node_list->item(0));
50 if ($a_obj_id ==null && $a_treeid != null) {
51 $obj_con = $this->dom->createElement(
"objectives");
52 $obj = $this->dom->createElement(
"primaryObjective");
53 $root = $this->dom->getElementsByTagName(
"sequencing")->item(0);
54 $obj_con->appendChild($obj);
55 $root->appendChild($obj_con);
56 $this->node =$this->dom->getElementsByTagName(
"primaryObjective")->item(0);
69 return $this->node->getAttribute(
"objectiveID");
74 return $this->node->getAttribute(
"minNormalizedMeasure");
79 return $this->node->getAttribute(
"title");
89 return $this->node->getAttribute(
"satisfiedByMeasure");
103 $this->seqNodeId = $a_seqnodeid;
108 $this->node->setAttribute(
"objectiveID",$a_id);
114 $this->node->setAttribute(
"minNormalizedMeasure",$a_minmeasure);
119 $this->node->setAttribute(
"title",$a_objectiveid);
124 $this->primary = $a_primary;
129 $this->node->setAttribute(
"satisfiedByMeasure",$a_satisfied);
134 $this->mappings = $a_mappings;
139 $this->node = $a_node;
160 $objectives = array();
162 $xpath_obj =
new DOMXPath($seq_item->dom);
163 $obj_node_list = $xpath_obj->query(
'//objective | //primaryObjective');
164 for ($i=0;$i<$obj_node_list->length;$i++) {
166 $obj->setNode($obj_node_list->item($i));
167 $mapping_node_list = $xpath_obj->query(
'//objective | //primaryObjective');
169 array_push($objectives,$obj);