5 require_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004SeqNode.php");
48 public function __construct($a_treeid = null, $a_rootlevel =
false)
52 $this->db = $DIC->database();
56 $this->rootLevel = $a_rootlevel;
58 if ($a_treeid != null) {
59 $this->treeNodeId = $a_treeid;
136 $this->importSeqXml = $a_val;
141 $this->seqNodeId = $a_seqnodeid;
146 $this->treeNodeId = $a_tree_node;
151 $this->sequencingId = $a_seq_id;
156 $this->nocopy = $a_nocopy;
161 $this->nodelete = $a_nodelete ;
166 $this->nomove = $a_nomove;
171 $this->importid = $a_importid;
176 $this->log->debug(
"seq xml: " . $a_seqxml);
177 $this->seqXml = $a_seqxml;
187 $this->rootLevel = $a_rootlevel;
194 $ilDB = $DIC->database();
196 $query =
"SELECT * FROM sahs_sc13_seq_item WHERE sahs_sc13_tree_node_id = " .
197 $ilDB->quote($a_node_id,
"integer") .
198 " AND rootlevel = " .
$ilDB->quote(
false,
"integer");
201 return array(
"copy"=>!$obj_rec[
'nocopy'],
"move"=>!$obj_rec[
'nomove'],
"delete"=>!$obj_rec[
'nodelete']);
223 while ($this->dom->hasChildNodes()) {
224 $this->dom->removeChild($this->dom->childNodes->item(0));
227 $element = $this->dom->createElement(
'sequencing');
228 $this->dom->appendChild($element);
230 if ($a_def_control_mode) {
231 $cm = $this->dom->createElement(
'controlMode');
232 $cm->setAttribute(
"flow",
"true");
233 $cm->setAttribute(
"choice",
"true");
234 $cm->setAttribute(
"forwardOnly",
"false");
235 $element->appendChild($cm);
251 $xpath_obj =
new DOMXPath($this->dom);
252 $obj_node_list = $xpath_obj->query(
'//objective | //primaryObjective');
253 for (
$i=0;
$i<$obj_node_list->length;
$i++) {
254 $obj_node_list->item(
$i)->removeAttribute(
"title");
256 $output = $this->dom->saveXML();
260 $output = preg_replace(
'/(<)([a-z]+|[A-Z]+)/',
'<imsss:$2',
$output);
261 $output = preg_replace(
'/(<\/)([a-z]+|[A-Z]+)/',
'</imsss:$2',
$output);
274 $query =
"SELECT * FROM sahs_sc13_seq_item WHERE (sahs_sc13_tree_node_id = " .
$ilDB->quote($this->treeNodeId,
"integer") .
275 " AND rootlevel =" .
$ilDB->quote($this->rootLevel,
"integer") .
")";
277 $obj_rec =
$ilDB->fetchAssoc($obj_set);
278 $this->seqXml = $obj_rec[
'seqxml'];
279 $this->importSeqXml = $obj_rec[
'importseqxml'];
280 $this->importId = $obj_rec[
'importid'];
281 $this->nocopy = $obj_rec[
'nocopy'];
282 $this->nomove = $obj_rec[
'nomove'];
283 $this->nodelete = $obj_rec[
'nodelete'];
297 public function delete($a_insert_node =
false)
301 $query =
"DELETE FROM sahs_sc13_seq_item" .
" WHERE (sahs_sc13_tree_node_id = " .
$ilDB->quote($this->treeNodeId,
"integer") .
302 " AND rootlevel=" .
$ilDB->quote($this->rootLevel,
"integer") .
")";
314 "sahs_sc13_seq_item",
315 array(
"sahs_sc13_tree_node_id" =>
array(
"integer", $this->treeNodeId),
316 "rootlevel" =>
array(
"integer", $this->rootLevel)),
318 "importid" =>
array(
"text", $this->importId),
319 "seqnodeid" =>
array(
"integer", (
int) $this->seqNodeId),
320 "sequencingid" =>
array(
"text", $this->sequencingId),
321 "nocopy" =>
array(
"integer", $this->nocopy),
322 "nodelete" =>
array(
"integer", $this->nodelete),
323 "nomove" =>
array(
"integer", $this->nomove),
324 "seqxml" =>
array(
"clob", $this->dom->saveXML()),
Class ilSCORM2004Condition.
loadItem()
Read data from DB into object.
__construct($a_treeid=null, $a_rootlevel=false)
Constructor public.
setRootLevel($a_rootlevel)
setSeqNodeId($a_seqnodeid)
static getAllowedActions($a_node_id)
setImportSeqXml($a_val)
Set import seq xml.
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
insert($import=false)
Insert/replace sequencing item in db.
exportAsXML($add_prefix=true)
Get sequencing information for export (use imsss namespace prefix)
setTreeNodeId($a_tree_node)
Create styles array
The data for the language used.
setSequencingId($a_seq_id)
setDefaultXml($a_def_control_mode=false)
Set default xml.
static getLogger($a_component_id)
Get component logger.
getImportSeqXml()
Get import seq xml.