ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilSCORM2004Utilities Class Reference

Class ilSCORM2004Utilities. More...

+ Collaboration diagram for ilSCORM2004Utilities:

Public Member Functions

 __construct ($a_id)
 
 getLeftRightInfo ()
 
 getImportIdent ()
 
 getAllowedActions ()
 
 getControlModeProperties ()
 
 getAllSequencingProperties ()
 

Protected Member Functions

 getSeqNodeId ()
 

Protected Attributes

 $db
 
 $log
 

Private Member Functions

 getSequencingId ()
 
 getItemId ()
 
 getId ()
 

Private Attributes

 $id = null
 

Detailed Description

Class ilSCORM2004Utilities.

Sequencing Utilities class for SCORM 2004 Editing

Author
Hendrik Holtmann holtm.nosp@m.ann@.nosp@m.me.co.nosp@m.m
Version
$Id$

Definition at line 17 of file class.ilSCORM2004Utilities.php.

Constructor & Destructor Documentation

◆ __construct()

ilSCORM2004Utilities::__construct (   $a_id)

Definition at line 37 of file class.ilSCORM2004Utilities.php.

References $DIC.

38  {
39  global $DIC;
40 
41  $this->db = $DIC->database();
42  $this->log = $DIC["ilLog"];
43  $this->id = $a_id;
44  }
global $DIC
Definition: saml.php:7

Member Function Documentation

◆ getAllowedActions()

ilSCORM2004Utilities::getAllowedActions ( )

Definition at line 150 of file class.ilSCORM2004Utilities.php.

References $db, $ilDB, $ilLog, $log, $query, ilDBConstants\FETCHMODE_ASSOC, and getId().

151  {
152  $ilDB = $this->db;
153  $ilLog = $this->log;
154  $ilLog->write("SCORM: getAllowedActions for" . $this->tree_node_id);
155  $query = "SELECT * FROM sahs_sc13_seq_item WHERE sahs_sc13_tree_node_id = " .
156  $ilDB->quote($this->getId(), "integer");
157  $obj_set = $ilDB->query($query);
158  $obj_rec = $obj_set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
159  return array("copy" => !$obj_rec['nocopy'],"move" => !$obj_rec['nomove'],"delete" => !$obj_rec['nodelete']);
160  }
$query
global $ilDB
+ Here is the call graph for this function:

◆ getAllSequencingProperties()

ilSCORM2004Utilities::getAllSequencingProperties ( )

Definition at line 177 of file class.ilSCORM2004Utilities.php.

References $db, $ilDB, $ilLog, $log, $query, ilDBConstants\FETCHMODE_ASSOC, getImportIdent(), and getSequencingId().

Referenced by getSeqNodeId().

178  {
179  $ilDB = $this->db;
180  $ilLog = $this->log;
181  $query = "SELECT * FROM sahs_sc13_seq_seq WHERE (id = " .
182  $ilDB->quote($this->getSequencingId(), "text") .
183  " AND importid=" . $ilDB->quote($this->getImportIdent(), "text") . ")";
184  $obj_set = $ilDB->query($query);
185  $ilLog->write("SCORM: getAllSequencingProperties for" . $this->getSequencingId());
186  $obj_rec = $obj_set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
187  $sprop = array(
188  'importId' => $obj_rec['importid'],
189  'activityAbsoluteDurationLimit' => $obj_rec['activityabsolutedurationlimit'],
190  'activityExperiencedDurationLimit' => $obj_rec['activityexperienceddurlimit'],
191  'attemptAbsoluteDurationLimit' => $obj_rec['attemptabsolutedurationlimit'],
192  'attemptExperiencedDurationLimit' => $obj_rec['attemptexperienceddurlimit'],
193  'attemptLimit' => $obj_rec['attemptlimit'],
194  'beginTimeLimit' => $obj_rec['begintimelimit'],
195  'completionSetByContent' => $obj_rec['completionsetbycontent'],
196  'constrainChoice' => $obj_rec['constrainchoice'],
197  'seqNodeId' => $obj_rec['seqnodeid'],
198  'endTimeLimit' => $obj_rec['endtimelimit'],
199  'id' => $obj_rec['id'],
200  'measureSatisfactionIfActive' => $obj_rec['measuresatisfactionifactive'],
201  'objectiveMeasureWeight' => $obj_rec['objectivemeasureweight'],
202  'objectiveSetByContent' => $obj_rec['objectivesetbycontent'],
203  'preventActivation' => $obj_rec['preventactivation'],
204  'randomizationTiming' => $obj_rec['randomizationtiming'],
205  'reorderChildren' => $obj_rec['reorderchildren'],
206  'requiredForCompleted' => $obj_rec['requiredforcompleted'],
207  'requiredForIncomplete' => $obj_rec['requiredforincomplete'],
208  'requiredForNotSatisfied' => $obj_rec['requiredfornotsatisfied'],
209  'requiredForSatisfied' => $obj_rec['requiredforsatisfied'],
210  'rollupObjectiveSatisfied' => $obj_rec['rollupobjectivesatisfied'],
211  'rollupProgressCompletion' => $obj_rec['rollupprogresscompletion'],
212  'selectCount' => $obj_rec['selectcount'],
213  'selectionTiming' => $obj_rec['selectiontiming'],
214  'sequencingId' => $obj_rec['sequencingid'],
215  'tracked' => $obj_rec['tracked'],
216  'useCurrentAttemptObjectiveInfo' => $obj_rec['usecurrentattemptobjectiveinfo'],
217  'useCurrentAttemptProgressInfo' => $obj_rec['usecurrentattemptprogressinfo'],
218  'flow' => $obj_rec['flow'],
219  'forwardOnly' => $obj_rec['forwardonly'],
220  'choice' => $obj_rec['choice'],
221  'choiceExit' => $obj_rec['choiceexit'] );
222  return $sprop;
223  }
$query
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getControlModeProperties()

ilSCORM2004Utilities::getControlModeProperties ( )

Definition at line 162 of file class.ilSCORM2004Utilities.php.

References $db, $ilDB, $query, ilDBConstants\FETCHMODE_ASSOC, and getSequencingId().

163  {
164  $ilDB = $this->db;
165  $query = "SELECT * FROM sahs_sc13_seq_seq WHERE id = " .
166  $ilDB->quote($this->getSequencingId(), "text");
167  $obj_set = $ilDB->query($query);
168  $obj_rec = $obj_set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
169  $c_properties = array(
170  'flow' => $obj_rec['flow'],
171  'forwardOnly' => $obj_rec['forwardonly'],
172  'choice' => $obj_rec['choice'],
173  'choiceExit' => $obj_rec['choiceexit'] );
174  return $c_properties;
175  }
$query
global $ilDB
+ Here is the call graph for this function:

◆ getId()

ilSCORM2004Utilities::getId ( )
private

Definition at line 145 of file class.ilSCORM2004Utilities.php.

References $id.

Referenced by getAllowedActions(), getImportIdent(), getItemId(), and getSequencingId().

146  {
147  return $this->id;
148  }
+ Here is the caller graph for this function:

◆ getImportIdent()

ilSCORM2004Utilities::getImportIdent ( )

Definition at line 131 of file class.ilSCORM2004Utilities.php.

References $db, $ilDB, $ilLog, $log, $query, ilDBConstants\FETCHMODE_ASSOC, and getId().

Referenced by getAllSequencingProperties(), and getLeftRightInfo().

132  {
133  $ilDB = $this->db;
134  $ilLog = $this->log;
135  $ilLog->write("SCORM: getImportIdent for" . $this->getId);
136  $query = "SELECT * FROM sahs_sc13_seq_item WHERE sahs_sc13_tree_node_id = " .
137  $ilDB->quote($this->getId(), "integer");
138  $obj_set = $ilDB->query($query);
139  $obj_rec = $obj_set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
140  return $obj_rec['importid'];
141  }
$query
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getItemId()

ilSCORM2004Utilities::getItemId ( )
private

Definition at line 119 of file class.ilSCORM2004Utilities.php.

References $db, $ilDB, $ilLog, $log, $query, ilDBConstants\FETCHMODE_ASSOC, and getId().

120  {
121  $ilDB = $this->db;
122  $ilLog = $this->log;
123  $ilLog->write("SCORM: getSequencingId for" . $this->getId);
124  $query = "SELECT * FROM sahs_sc13_seq_item WHERE sahs_sc13_tree_node_id = " .
125  $ilDB->quote($this->getId(), "integer");
126  $obj_set = $ilDB->query($query);
127  $obj_rec = $obj_set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
128  return $obj_rec['seqnodeid'];
129  }
$query
global $ilDB
+ Here is the call graph for this function:

◆ getLeftRightInfo()

ilSCORM2004Utilities::getLeftRightInfo ( )

Definition at line 83 of file class.ilSCORM2004Utilities.php.

References $db, $ilDB, $ilLog, $log, $query, getImportIdent(), and getSeqNodeId().

84  {
85  $ilDB = $this->db;
87  $ilLog->write("SCORM: getLeftRightInfo");
88  $query = "SELECT * FROM sahs_sc13_seq_tree WHERE (child = " .
89  $ilDB->quote($this->getSeqNodeId(), "integer") .
90  " AND importid=" . $ilDB->quote($this->getImportIdent(), "text") . ")";
91  $obj_set = $ilDB->query($query);
92  $ilLog->write("SCORM: getLeftRightInfo executed" . $query);
93  $obj_rec = $ilDB->fetchAssoc($obj_set);
94  return array("left" => $obj_rec["lft"], "right" => $obj_rec["rgt"]);
95  }
$query
global $ilDB
+ Here is the call graph for this function:

◆ getSeqNodeId()

ilSCORM2004Utilities::getSeqNodeId ( )
protected

Definition at line 98 of file class.ilSCORM2004Utilities.php.

References $db, $ilDB, $ilLog, $log, and getAllSequencingProperties().

Referenced by getLeftRightInfo().

99  {
100  $ilDB = $this->db;
101  $ilLog = $this->log;
102  $all_props = $this->getAllSequencingProperties();
103  $ilLog->write("SCORM: getSeqNodeId: " . $all_props["seqnodeid"]);
104  return $all_props["seqnodeid"];
105  }
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSequencingId()

ilSCORM2004Utilities::getSequencingId ( )
private

Definition at line 107 of file class.ilSCORM2004Utilities.php.

References $db, $ilDB, $ilLog, $log, $query, ilDBConstants\FETCHMODE_ASSOC, and getId().

Referenced by getAllSequencingProperties(), and getControlModeProperties().

108  {
109  $ilDB = $this->db;
110  $ilLog = $this->log;
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);
115  $obj_rec = $obj_set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
116  return $obj_rec['sequencingid'];
117  }
$query
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $db

◆ $id

ilSCORM2004Utilities::$id = null
private

Definition at line 31 of file class.ilSCORM2004Utilities.php.

Referenced by getId().

◆ $log


The documentation for this class was generated from the following file: