Class ilSCORM2004DeleteData.
More...
◆ getGlobalToSystemObjectiveIdStringForPackage()
static ilSCORM2004DeleteData::getGlobalToSystemObjectiveIdStringForPackage |
( |
|
$packageId | ) |
|
|
static |
Definition at line 194 of file class.ilSCORM2004DeleteData.php.
References $data, $ilDB, $packageId, $res, and array.
197 $existing_key_template =
"";
198 $global_to_system = 1;
200 $res = $ilDB->queryF(
'SELECT global_to_system FROM cp_package WHERE obj_id = %s',
206 $global_to_system =
$data[
'global_to_system'];
208 if ($global_to_system == 0)
return "";
210 $res = $ilDB->queryF(
' 211 SELECT targetobjectiveid 212 FROM cp_mapinfo, cp_node 213 WHERE cp_node.slm_id = %s 214 AND cp_node.nodename = %s 215 AND cp_mapinfo.cp_node_id = cp_node.cp_node_id',
216 array(
'integer',
'text'),
221 $existing_key_template .=
"'".$data[
'targetobjectiveid'].
"',";
224 $existing_key_template = substr($existing_key_template, 0, strlen($existing_key_template) - 1);
226 return $existing_key_template;
Create styles array
The data for the language used.
◆ removeCMIDataForNodes()
static ilSCORM2004DeleteData::removeCMIDataForNodes |
( |
|
$cmi_node_values | ) |
|
|
static |
Definition at line 147 of file class.ilSCORM2004DeleteData.php.
References $data, $ilDB, $query, $res, and array.
152 $cmi_inode_values =
array();
154 $query =
'SELECT cmi_interaction_id FROM cmi_interaction WHERE ' 155 . $ilDB->in(
'cmi_interaction.cmi_node_id', $cmi_node_values,
false,
'integer');
159 $cmi_inode_values[] =
$data[
'cmi_interaction_id'];
163 $query =
'DELETE FROM cmi_correct_response WHERE ' 164 . $ilDB->in(
'cmi_correct_response.cmi_interaction_id', $cmi_inode_values,
false,
'integer');
165 $ilDB->manipulate(
$query);
168 $query =
'DELETE FROM cmi_objective WHERE ' 169 . $ilDB->in(
'cmi_objective.cmi_interaction_id', $cmi_inode_values,
false,
'integer');
170 $ilDB->manipulate(
$query);
173 $query =
'DELETE FROM cmi_objective WHERE ' 174 . $ilDB->in(
'cmi_objective.cmi_node_id', $cmi_node_values,
false,
'integer');
175 $ilDB->manipulate(
$query);
178 $query =
'DELETE FROM cmi_interaction WHERE ' 179 . $ilDB->in(
'cmi_interaction.cmi_node_id', $cmi_node_values,
false,
'integer');
180 $ilDB->manipulate(
$query);
183 $query =
'DELETE FROM cmi_comment WHERE ' 184 . $ilDB->in(
'cmi_comment.cmi_node_id', $cmi_node_values,
false,
'integer');
185 $ilDB->manipulate(
$query);
188 $query =
'DELETE FROM cmi_node WHERE ' 189 . $ilDB->in(
'cmi_node.cmi_node_id', $cmi_node_values,
false,
'integer');
190 $ilDB->manipulate(
$query);
Create styles array
The data for the language used.
◆ removeCMIDataForPackage()
static ilSCORM2004DeleteData::removeCMIDataForPackage |
( |
|
$packageId | ) |
|
|
static |
Definition at line 14 of file class.ilSCORM2004DeleteData.php.
References $data, $ilDB, $packageId, $query, $res, and array.
Referenced by ilSCORM13Package\removeCMIData().
18 $res = $ilDB->queryF(
' 19 SELECT cmi_node.cmi_node_id 20 FROM cmi_node, cp_node 21 WHERE cp_node.slm_id = %s AND cmi_node.cp_node_id = cp_node.cp_node_id',
27 $cmi_node_values[] =
$data[
'cmi_node_id'];
29 self::removeCMIDataForNodes($cmi_node_values);
33 $query =
'DELETE FROM cmi_custom WHERE obj_id = %s';
37 $query =
'DELETE FROM sahs_user WHERE obj_id = %s';
41 $query =
'DELETE FROM cmi_gobjective WHERE scope_id = %s';
44 $s_globalObjectiveId=self::getGlobalToSystemObjectiveIdStringForPackage(
$packageId);
45 if ($s_globalObjectiveId !=
"") {
47 'DELETE FROM cmi_gobjective WHERE scope_id = %s AND objective_id in ('.$s_globalObjectiveId.
')',
Create styles array
The data for the language used.
◆ removeCMIDataForUser()
static ilSCORM2004DeleteData::removeCMIDataForUser |
( |
|
$user_id | ) |
|
|
static |
Definition at line 54 of file class.ilSCORM2004DeleteData.php.
References $data, $ilDB, $res, and array.
Referenced by ilSCORM13Package\_removeTrackingDataForUser().
59 $res = $ilDB->queryF(
' 60 SELECT cmi_node.cmi_node_id 61 FROM cmi_node, cp_node 62 WHERE cmi_node.user_id = %s AND cmi_node.cp_node_id = cp_node.cp_node_id',
69 $cmi_node_values[] =
$data[
'cmi_node_id'];
71 self::removeCMIDataForNodes($cmi_node_values);
76 'DELETE FROM cmi_custom WHERE user_id = %s',
83 'DELETE FROM sahs_user WHERE user_id = %s',
90 'DELETE FROM cmi_gobjective WHERE user_id = %s',
Create styles array
The data for the language used.
◆ removeCMIDataForUserAndPackage()
static ilSCORM2004DeleteData::removeCMIDataForUserAndPackage |
( |
|
$user_id, |
|
|
|
$packageId |
|
) |
| |
|
static |
Definition at line 97 of file class.ilSCORM2004DeleteData.php.
References $data, $ilDB, $packageId, $res, and array.
Referenced by ilObjSCORM2004LearningModule\deleteTrackingDataOfUsers().
102 $res = $ilDB->queryF(
' 103 SELECT cmi_node.cmi_node_id 104 FROM cmi_node, cp_node 105 WHERE cmi_node.user_id = %s AND cmi_node.cp_node_id = cp_node.cp_node_id AND cp_node.slm_id = %s',
106 array(
'integer',
'integer'),
111 $cmi_node_values[] =
$data[
'cmi_node_id'];
113 self::removeCMIDataForNodes($cmi_node_values);
118 'DELETE FROM cmi_custom WHERE user_id = %s AND obj_id = %s',
119 array(
'integer',
'integer'),
125 'DELETE FROM sahs_user WHERE user_id = %s AND obj_id = %s',
126 array(
'integer',
'integer'),
132 'DELETE FROM cmi_gobjective WHERE user_id = %s AND scope_id = %s',
133 array(
'integer',
'integer'),
137 $s_globalObjectiveId=self::getGlobalToSystemObjectiveIdStringForPackage(
$packageId);
138 if ($s_globalObjectiveId !=
"") {
140 'DELETE FROM cmi_gobjective WHERE user_id = %s AND scope_id = %s AND objective_id in ('.$s_globalObjectiveId.
')',
141 array(
'integer',
'integer'),
Create styles array
The data for the language used.
The documentation for this class was generated from the following file: