Class ilSCORM2004DeleteData.
More...
◆ getGlobalToSystemObjectiveIdStringForPackage()
static ilSCORM2004DeleteData::getGlobalToSystemObjectiveIdStringForPackage |
( |
|
$packageId | ) |
|
|
static |
Definition at line 205 of file class.ilSCORM2004DeleteData.php.
References $data, $DIC, $ilDB, $packageId, and $res.
209 $ilDB = $DIC->database();
211 $existing_key_template =
"";
212 $global_to_system = 1;
215 'SELECT global_to_system FROM cp_package WHERE obj_id = %s',
220 $global_to_system =
$data[
'global_to_system'];
222 if ($global_to_system == 0) {
228 SELECT targetobjectiveid 229 FROM cp_mapinfo, cp_node 230 WHERE cp_node.slm_id = %s 231 AND cp_node.nodename = %s 232 AND cp_mapinfo.cp_node_id = cp_node.cp_node_id',
233 array(
'integer',
'text'),
237 $existing_key_template .=
"'" .
$data[
'targetobjectiveid'] .
"',";
240 $existing_key_template = substr($existing_key_template, 0, strlen($existing_key_template) - 1);
242 return $existing_key_template;
foreach($_POST as $key=> $value) $res
◆ removeCMIDataForNodes()
static ilSCORM2004DeleteData::removeCMIDataForNodes |
( |
array |
$cmi_node_values | ) |
|
|
static |
- Parameters
-
Definition at line 158 of file class.ilSCORM2004DeleteData.php.
References $data, $DIC, $ilDB, $query, and $res.
162 $ilDB = $DIC->database();
165 $cmi_inode_values = array();
167 $query =
'SELECT cmi_interaction_id FROM cmi_interaction WHERE ' 168 .
$ilDB->in(
'cmi_interaction.cmi_node_id', $cmi_node_values,
false,
'integer');
171 $cmi_inode_values[] =
$data[
'cmi_interaction_id'];
175 $query =
'DELETE FROM cmi_correct_response WHERE ' 176 .
$ilDB->in(
'cmi_correct_response.cmi_interaction_id', $cmi_inode_values,
false,
'integer');
180 $query =
'DELETE FROM cmi_objective WHERE ' 181 .
$ilDB->in(
'cmi_objective.cmi_interaction_id', $cmi_inode_values,
false,
'integer');
185 $query =
'DELETE FROM cmi_objective WHERE ' 186 .
$ilDB->in(
'cmi_objective.cmi_node_id', $cmi_node_values,
false,
'integer');
190 $query =
'DELETE FROM cmi_interaction WHERE ' 191 .
$ilDB->in(
'cmi_interaction.cmi_node_id', $cmi_node_values,
false,
'integer');
195 $query =
'DELETE FROM cmi_comment WHERE ' 196 .
$ilDB->in(
'cmi_comment.cmi_node_id', $cmi_node_values,
false,
'integer');
200 $query =
'DELETE FROM cmi_node WHERE ' 201 .
$ilDB->in(
'cmi_node.cmi_node_id', $cmi_node_values,
false,
'integer');
foreach($_POST as $key=> $value) $res
◆ removeCMIDataForPackage()
static ilSCORM2004DeleteData::removeCMIDataForPackage |
( |
|
$packageId | ) |
|
|
static |
Definition at line 14 of file class.ilSCORM2004DeleteData.php.
References $data, $DIC, $ilDB, $packageId, $query, and $res.
Referenced by ilSCORM13Package\removeCMIData().
18 $ilDB = $DIC->database();
22 SELECT cmi_node.cmi_node_id 23 FROM cmi_node, cp_node 24 WHERE cp_node.slm_id = %s AND cmi_node.cp_node_id = cp_node.cp_node_id',
28 $cmi_node_values = [];
30 $cmi_node_values[] =
$data[
'cmi_node_id'];
32 self::removeCMIDataForNodes($cmi_node_values);
36 $query =
'DELETE FROM cmi_custom WHERE obj_id = %s';
40 $query =
'DELETE FROM sahs_user WHERE obj_id = %s';
44 $query =
'DELETE FROM cmi_gobjective WHERE scope_id = %s';
47 $s_globalObjectiveId = self::getGlobalToSystemObjectiveIdStringForPackage(
$packageId);
48 if ($s_globalObjectiveId !=
"") {
50 'DELETE FROM cmi_gobjective WHERE scope_id = %s AND objective_id in (' . $s_globalObjectiveId .
')',
foreach($_POST as $key=> $value) $res
◆ removeCMIDataForUser()
static ilSCORM2004DeleteData::removeCMIDataForUser |
( |
|
$user_id | ) |
|
|
static |
Definition at line 57 of file class.ilSCORM2004DeleteData.php.
References $data, $DIC, $ilDB, and $res.
Referenced by ilSCORM13Package\_removeTrackingDataForUser().
61 $ilDB = $DIC->database();
66 SELECT cmi_node.cmi_node_id 67 FROM cmi_node, cp_node 68 WHERE cmi_node.user_id = %s AND cmi_node.cp_node_id = cp_node.cp_node_id',
73 $cmi_node_values = [];
75 $cmi_node_values[] =
$data[
'cmi_node_id'];
77 self::removeCMIDataForNodes($cmi_node_values);
82 'DELETE FROM cmi_custom WHERE user_id = %s',
89 'DELETE FROM sahs_user WHERE user_id = %s',
96 'DELETE FROM cmi_gobjective WHERE user_id = %s',
foreach($_POST as $key=> $value) $res
◆ removeCMIDataForUserAndPackage()
static ilSCORM2004DeleteData::removeCMIDataForUserAndPackage |
( |
|
$user_id, |
|
|
|
$packageId |
|
) |
| |
|
static |
Definition at line 102 of file class.ilSCORM2004DeleteData.php.
References $data, $DIC, $ilDB, $packageId, and $res.
Referenced by ilObjSCORM2004LearningModule\deleteTrackingDataOfUsers().
106 $ilDB = $DIC->database();
111 SELECT cmi_node.cmi_node_id 112 FROM cmi_node, cp_node 113 WHERE cmi_node.user_id = %s AND cmi_node.cp_node_id = cp_node.cp_node_id AND cp_node.slm_id = %s',
114 array(
'integer',
'integer'),
117 $cmi_node_values = [];
119 $cmi_node_values[] =
$data[
'cmi_node_id'];
121 self::removeCMIDataForNodes($cmi_node_values);
126 'DELETE FROM cmi_custom WHERE user_id = %s AND obj_id = %s',
127 array(
'integer',
'integer'),
133 'DELETE FROM sahs_user WHERE user_id = %s AND obj_id = %s',
134 array(
'integer',
'integer'),
140 'DELETE FROM cmi_gobjective WHERE user_id = %s AND scope_id = %s',
141 array(
'integer',
'integer'),
145 $s_globalObjectiveId = self::getGlobalToSystemObjectiveIdStringForPackage(
$packageId);
146 if ($s_globalObjectiveId !=
"") {
148 'DELETE FROM cmi_gobjective WHERE user_id = %s AND scope_id = %s AND objective_id in (' . $s_globalObjectiveId .
')',
149 array(
'integer',
'integer'),
foreach($_POST as $key=> $value) $res
The documentation for this class was generated from the following file: