53 require_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Template.php");
56 $has_template =
false;
58 $mtree =
new ilTree($a_slm_id);
59 $mtree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
60 $mtree->setTreeTablePK(
"slm_id");
63 for ($i=0;$i<count($parents);$i++)
76 $parent_id = $tree->getParentId(
$id);
77 if ($parent_id != 0) {
78 array_push($a_parents,$parent_id);
89 $ilLog->write(
"SCORM: getLeftRightInfo");
90 $query =
"SELECT * FROM sahs_sc13_seq_tree WHERE (child = ".
92 " AND importid=".$ilDB->quote($this->
getImportIdent(),
"text").
")";
93 $obj_set = $ilDB->query(
$query);
94 $ilLog->write(
"SCORM: getLeftRightInfo executed".
$query);
95 $obj_rec = $ilDB->fetchAssoc($obj_set);
96 return array(
"left"=> $obj_rec[
"lft"],
"right" => $obj_rec[
"rgt"]);
104 $ilLog->write(
"SCORM: getSeqNodeId: ".$all_props[
"seqnodeid"]);
105 return $all_props[
"seqnodeid"];
111 $ilLog->write(
"SCORM: getSequencingId for".$this->
getId());
112 $query =
"SELECT * FROM sahs_sc13_seq_item WHERE sahs_sc13_tree_node_id = ".
113 $ilDB->quote($this->
getId(),
"integer");
114 $obj_set = $ilDB->query(
$query);
116 return $obj_rec[
'sequencingid'];
122 $ilLog->write(
"SCORM: getSequencingId for".$this->
getId);
123 $query =
"SELECT * FROM sahs_sc13_seq_item WHERE sahs_sc13_tree_node_id = ".
124 $ilDB->quote($this->
getId(),
"integer");
125 $obj_set = $ilDB->query(
$query);
127 return $obj_rec[
'seqnodeid'];
133 $ilLog->write(
"SCORM: getImportIdent for".$this->
getId);
134 $query =
"SELECT * FROM sahs_sc13_seq_item WHERE sahs_sc13_tree_node_id = ".
135 $ilDB->quote($this->
getId(),
"integer");
136 $obj_set = $ilDB->query(
$query);
138 return $obj_rec[
'importid'];
151 $ilLog->write(
"SCORM: getAllowedActions for".$this->tree_node_id);
152 $query =
"SELECT * FROM sahs_sc13_seq_item WHERE sahs_sc13_tree_node_id = ".
153 $ilDB->quote($this->
getId(),
"integer");
154 $obj_set = $ilDB->query(
$query);
156 return array(
"copy"=>!$obj_rec[
'nocopy'],
"move"=>!$obj_rec[
'nomove'],
"delete"=>!$obj_rec[
'nodelete']);
162 $query =
"SELECT * FROM sahs_sc13_seq_seq WHERE id = ".
164 $obj_set = $ilDB->query(
$query);
166 $c_properties = array(
167 'flow' => $obj_rec[
'flow'],
168 'forwardOnly' => $obj_rec[
'forwardonly'],
169 'choice' => $obj_rec[
'choice'],
170 'choiceExit' => $obj_rec[
'choiceexit'] );
171 return $c_properties;
177 $query =
"SELECT * FROM sahs_sc13_seq_seq WHERE (id = ".
179 " AND importid=".$ilDB->quote($this->
getImportIdent(),
"text").
")";
180 $obj_set = $ilDB->query(
$query);
181 $ilLog->write(
"SCORM: getAllSequencingProperties for".$this->
getSequencingId());
184 'importId' => $obj_rec[
'importid'],
185 'activityAbsoluteDurationLimit' => $obj_rec[
'activityabsolutedurationlimit'],
186 'activityExperiencedDurationLimit' => $obj_rec[
'activityexperienceddurlimit'],
187 'attemptAbsoluteDurationLimit' => $obj_rec[
'attemptabsolutedurationlimit'],
188 'attemptExperiencedDurationLimit' => $obj_rec[
'attemptexperienceddurlimit'],
189 'attemptLimit' => $obj_rec[
'attemptlimit'],
190 'beginTimeLimit' => $obj_rec[
'begintimelimit'],
191 'completionSetByContent' => $obj_rec[
'completionsetbycontent'],
192 'constrainChoice' => $obj_rec[
'constrainchoice'],
193 'seqNodeId' => $obj_rec[
'seqnodeid'],
194 'endTimeLimit' => $obj_rec[
'endtimelimit'],
195 'id' => $obj_rec[
'id'],
196 'measureSatisfactionIfActive' => $obj_rec[
'measuresatisfactionifactive'],
197 'objectiveMeasureWeight' => $obj_rec[
'objectivemeasureweight'],
198 'objectiveSetByContent' => $obj_rec[
'objectivesetbycontent'],
199 'preventActivation' => $obj_rec[
'preventactivation'],
200 'randomizationTiming' => $obj_rec[
'randomizationtiming'],
201 'reorderChildren' => $obj_rec[
'reorderchildren'],
202 'requiredForCompleted' => $obj_rec[
'requiredforcompleted'],
203 'requiredForIncomplete' => $obj_rec[
'requiredforincomplete'],
204 'requiredForNotSatisfied' => $obj_rec[
'requiredfornotsatisfied'],
205 'requiredForSatisfied' => $obj_rec[
'requiredforsatisfied'],
206 'rollupObjectiveSatisfied' => $obj_rec[
'rollupobjectivesatisfied'],
207 'rollupProgressCompletion' => $obj_rec[
'rollupprogresscompletion'],
208 'selectCount' => $obj_rec[
'selectcount'],
209 'selectionTiming' => $obj_rec[
'selectiontiming'],
210 'sequencingId' => $obj_rec[
'sequencingid'],
211 'tracked' => $obj_rec[
'tracked'],
212 'useCurrentAttemptObjectiveInfo' => $obj_rec[
'usecurrentattemptobjectiveinfo'],
213 'useCurrentAttemptProgressInfo' => $obj_rec[
'usecurrentattemptprogressinfo'],
214 'flow' => $obj_rec[
'flow'],
215 'forwardOnly' => $obj_rec[
'forwardonly'],
216 'choice' => $obj_rec[
'choice'],
217 'choiceExit' => $obj_rec[
'choiceexit'] );