35 require_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
36 require_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004MapInfo.php");
64 if ($a_obj_id !=null && $a_treeid != null) {
65 $xpath_obj =
new DOMXPath($this->dom);
66 $obj_node_list = $xpath_obj->query(
'//objective[@objectiveID = "'.$a_obj_id.
'"] | '.
67 '//primaryObjective[@objectiveID = "'.$a_obj_id.
'"]');
68 $this->
setNode($obj_node_list->item(0));
70 if ($a_obj_id ==null && $a_treeid != null) {
71 $obj_con = $this->dom->createElement(
"objectives");
72 $obj = $this->dom->createElement(
"primaryObjective");
73 $root = $this->dom->getElementsByTagName(
"sequencing")->item(0);
74 $obj_con->appendChild($obj);
75 $root->appendChild($obj_con);
76 $this->node =$this->dom->getElementsByTagName(
"primaryObjective")->item(0);
89 return $this->node->getAttribute(
"objectiveID");
94 return $this->node->getAttribute(
"minNormalizedMeasure");
99 return $this->node->getAttribute(
"title");
109 return $this->node->getAttribute(
"satisfiedByMeasure");
123 $this->seqNodeId = $a_seqnodeid;
128 $this->node->setAttribute(
"objectiveID",$a_id);
134 $this->node->setAttribute(
"minNormalizedMeasure",$a_minmeasure);
139 $this->node->setAttribute(
"title",$a_objectiveid);
144 $this->primary = $a_primary;
149 $this->node->setAttribute(
"satisfiedByMeasure",$a_satisfied);
154 $this->mappings = $a_mappings;
159 $this->node = $a_node;
180 $objectives = array();
182 $xpath_obj =
new DOMXPath($seq_item->dom);
183 $obj_node_list = $xpath_obj->query(
'//objective | //primaryObjective');
184 for ($i=0;$i<$obj_node_list->length;$i++) {
186 $obj->setNode($obj_node_list->item($i));
187 $mapping_node_list = $xpath_obj->query(
'//objective | //primaryObjective');
189 array_push($objectives,$obj);