5require_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqNode.php");
48 $this->rootLevel = $a_rootlevel;
50 if ($a_treeid !=
null)
52 $this->treeNodeId = $a_treeid;
54 $this->dom =
new DOMDocument();
129 $this->importSeqXml = $a_val;
134 $this->seqNodeId = $a_seqnodeid;
139 $this->treeNodeId = $a_tree_node;
144 $this->sequencingId = $a_seq_id;
149 $this->nocopy = $a_nocopy;
154 $this->nodelete = $a_nodelete ;
159 $this->nomove = $a_nomove;
164 $this->importid = $a_importid;
169 $this->log->debug(
"seq xml: ".$a_seqxml);
170 $this->seqXml = $a_seqxml;
180 $this->rootLevel = $a_rootlevel;
186 $query =
"SELECT * FROM sahs_sc13_seq_item WHERE sahs_sc13_tree_node_id = ".
187 $ilDB->quote($a_node_id,
"integer").
188 " AND rootlevel = ".$ilDB->quote(
false,
"integer");
191 return array(
"copy"=>!$obj_rec[
'nocopy'],
"move"=>!$obj_rec[
'nomove'],
"delete"=>!$obj_rec[
'nodelete']);
216 while ($this->dom->hasChildNodes()){
217 $this->dom->removeChild($this->dom->childNodes->item(0));
220 $element = $this->dom->createElement(
'sequencing');
221 $this->dom->appendChild($element);
223 if ($a_def_control_mode)
225 $cm = $this->dom->createElement(
'controlMode');
226 $cm->setAttribute(
"flow",
"true");
227 $cm->setAttribute(
"choice",
"true");
228 $cm->setAttribute(
"forwardOnly",
"false");
229 $element->appendChild($cm);
245 $xpath_obj =
new DOMXPath($this->dom);
246 $obj_node_list = $xpath_obj->query(
'//objective | //primaryObjective');
247 for ($i=0;$i<$obj_node_list->length;$i++) {
248 $obj_node_list->item($i)->removeAttribute(
"title");
250 $output = $this->dom->saveXML();
255 $output = preg_replace(
'/(<)([a-z]+|[A-Z]+)/',
'<imsss:$2',
$output);
256 $output = preg_replace(
'/(<\/)([a-z]+|[A-Z]+)/',
'</imsss:$2',
$output);
269 $query =
"SELECT * FROM sahs_sc13_seq_item WHERE (sahs_sc13_tree_node_id = ".$ilDB->quote($this->treeNodeId,
"integer").
270 " AND rootlevel =".$ilDB->quote($this->rootLevel,
"integer").
")";
272 $obj_rec =
$ilDB->fetchAssoc($obj_set);
273 $this->seqXml = $obj_rec[
'seqxml'];
274 $this->importSeqXml = $obj_rec[
'importseqxml'];
275 $this->importId = $obj_rec[
'importid'];
276 $this->nocopy = $obj_rec[
'nocopy'];
277 $this->nomove = $obj_rec[
'nomove'];
278 $this->nodelete = $obj_rec[
'nodelete'];
292 public function delete($a_insert_node =
false)
296 $query =
"DELETE FROM sahs_sc13_seq_item".
" WHERE (sahs_sc13_tree_node_id = ".
$ilDB->quote($this->treeNodeId,
"integer").
297 " AND rootlevel=".$ilDB->quote($this->rootLevel,
"integer").
")";
308 $ilDB->replace(
"sahs_sc13_seq_item",
309 array(
"sahs_sc13_tree_node_id" => array(
"integer", $this->treeNodeId),
310 "rootlevel" => array(
"integer", $this->rootLevel)),
312 "importid" => array(
"text", $this->importId),
313 "seqnodeid" => array(
"integer", (
int) $this->seqNodeId),
314 "sequencingid" => array(
"text", $this->sequencingId),
315 "nocopy" => array(
"integer", $this->nocopy),
316 "nodelete" => array(
"integer", $this->nodelete),
317 "nomove" => array(
"integer", $this->nomove),
318 "seqxml" => array(
"clob", $this->dom->saveXML()),
An exception for terminatinating execution or to throw for unit testing.
static getLogger($a_component_id)
Get component logger.
Class ilSCORM2004Condition.
__construct($a_treeid=null, $a_rootlevel=false)
Constructor @access public.
setImportSeqXml($a_val)
Set import seq xml.
static getAllowedActions($a_node_id)
setSeqNodeId($a_seqnodeid)
insert($import=false)
Insert/replace sequencing item in db.
getImportSeqXml()
Get import seq xml.
exportAsXML($add_prefix=true)
Get sequencing information for export (use imsss namespace prefix)
loadItem()
Read data from DB into object.
setDefaultXml($a_def_control_mode=false)
Set default xml.
setSequencingId($a_seq_id)
setTreeNodeId($a_tree_node)
setRootLevel($a_rootlevel)
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output