Class ilSCORM2004DeleteData.
More...
◆ getGlobalToSystemObjectiveIdStringForPackage()
static ilSCORM2004DeleteData::getGlobalToSystemObjectiveIdStringForPackage |
( |
|
$packageId | ) |
|
|
static |
Definition at line 208 of file class.ilSCORM2004DeleteData.php.
References $data, $DIC, $ilDB, $packageId, $res, and array.
212 $ilDB = $DIC->database();
214 $existing_key_template =
"";
215 $global_to_system = 1;
218 'SELECT global_to_system FROM cp_package WHERE obj_id = %s',
223 $global_to_system =
$data[
'global_to_system'];
225 if ($global_to_system == 0) {
231 SELECT targetobjectiveid 232 FROM cp_mapinfo, cp_node 233 WHERE cp_node.slm_id = %s 234 AND cp_node.nodename = %s 235 AND cp_mapinfo.cp_node_id = cp_node.cp_node_id',
236 array(
'integer',
'text'),
240 $existing_key_template .=
"'" .
$data[
'targetobjectiveid'] .
"',";
243 $existing_key_template = substr($existing_key_template, 0, strlen($existing_key_template) - 1);
245 return $existing_key_template;
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
◆ removeCMIDataForNodes()
static ilSCORM2004DeleteData::removeCMIDataForNodes |
( |
array |
$cmi_node_values | ) |
|
|
static |
- Parameters
-
Definition at line 161 of file class.ilSCORM2004DeleteData.php.
References $data, $DIC, $ilDB, $query, $res, and array.
165 $ilDB = $DIC->database();
168 $cmi_inode_values =
array();
170 $query =
'SELECT cmi_interaction_id FROM cmi_interaction WHERE ' 171 .
$ilDB->in(
'cmi_interaction.cmi_node_id', $cmi_node_values,
false,
'integer');
174 $cmi_inode_values[] =
$data[
'cmi_interaction_id'];
178 $query =
'DELETE FROM cmi_correct_response WHERE ' 179 .
$ilDB->in(
'cmi_correct_response.cmi_interaction_id', $cmi_inode_values,
false,
'integer');
183 $query =
'DELETE FROM cmi_objective WHERE ' 184 .
$ilDB->in(
'cmi_objective.cmi_interaction_id', $cmi_inode_values,
false,
'integer');
188 $query =
'DELETE FROM cmi_objective WHERE ' 189 .
$ilDB->in(
'cmi_objective.cmi_node_id', $cmi_node_values,
false,
'integer');
193 $query =
'DELETE FROM cmi_interaction WHERE ' 194 .
$ilDB->in(
'cmi_interaction.cmi_node_id', $cmi_node_values,
false,
'integer');
198 $query =
'DELETE FROM cmi_comment WHERE ' 199 .
$ilDB->in(
'cmi_comment.cmi_node_id', $cmi_node_values,
false,
'integer');
203 $query =
'DELETE FROM cmi_node WHERE ' 204 .
$ilDB->in(
'cmi_node.cmi_node_id', $cmi_node_values,
false,
'integer');
foreach($_POST as $key=> $value) $res
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, $DIC, $ilDB, $packageId, $query, $res, and array.
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',
29 $cmi_node_values = [];
31 $cmi_node_values[] =
$data[
'cmi_node_id'];
33 self::removeCMIDataForNodes($cmi_node_values);
37 $query =
'DELETE FROM cmi_custom WHERE obj_id = %s';
41 $query =
'DELETE FROM sahs_user WHERE obj_id = %s';
45 $query =
'DELETE FROM cmi_gobjective WHERE scope_id = %s';
48 $s_globalObjectiveId=self::getGlobalToSystemObjectiveIdStringForPackage(
$packageId);
49 if ($s_globalObjectiveId !=
"") {
51 'DELETE FROM cmi_gobjective WHERE scope_id = %s AND objective_id in (' . $s_globalObjectiveId .
')',
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
◆ removeCMIDataForUser()
static ilSCORM2004DeleteData::removeCMIDataForUser |
( |
|
$user_id | ) |
|
|
static |
Definition at line 58 of file class.ilSCORM2004DeleteData.php.
References $data, $DIC, $ilDB, $res, and array.
Referenced by ilSCORM13Package\_removeTrackingDataForUser().
62 $ilDB = $DIC->database();
67 SELECT cmi_node.cmi_node_id 68 FROM cmi_node, cp_node 69 WHERE cmi_node.user_id = %s AND cmi_node.cp_node_id = cp_node.cp_node_id',
74 $cmi_node_values = [];
77 $cmi_node_values[] =
$data[
'cmi_node_id'];
79 self::removeCMIDataForNodes($cmi_node_values);
84 'DELETE FROM cmi_custom WHERE user_id = %s',
91 'DELETE FROM sahs_user WHERE user_id = %s',
98 'DELETE FROM cmi_gobjective WHERE user_id = %s',
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
◆ removeCMIDataForUserAndPackage()
static ilSCORM2004DeleteData::removeCMIDataForUserAndPackage |
( |
|
$user_id, |
|
|
|
$packageId |
|
) |
| |
|
static |
Definition at line 104 of file class.ilSCORM2004DeleteData.php.
References $data, $DIC, $ilDB, $packageId, $res, and array.
Referenced by ilObjSCORM2004LearningModule\deleteTrackingDataOfUsers().
108 $ilDB = $DIC->database();
113 SELECT cmi_node.cmi_node_id 114 FROM cmi_node, cp_node 115 WHERE cmi_node.user_id = %s AND cmi_node.cp_node_id = cp_node.cp_node_id AND cp_node.slm_id = %s',
116 array(
'integer',
'integer'),
120 $cmi_node_values = [];
122 $cmi_node_values[] =
$data[
'cmi_node_id'];
124 self::removeCMIDataForNodes($cmi_node_values);
129 'DELETE FROM cmi_custom WHERE user_id = %s AND obj_id = %s',
130 array(
'integer',
'integer'),
136 'DELETE FROM sahs_user WHERE user_id = %s AND obj_id = %s',
137 array(
'integer',
'integer'),
143 'DELETE FROM cmi_gobjective WHERE user_id = %s AND scope_id = %s',
144 array(
'integer',
'integer'),
148 $s_globalObjectiveId=self::getGlobalToSystemObjectiveIdStringForPackage(
$packageId);
149 if ($s_globalObjectiveId !=
"") {
151 'DELETE FROM cmi_gobjective WHERE user_id = %s AND scope_id = %s AND objective_id in (' . $s_globalObjectiveId .
')',
152 array(
'integer',
'integer'),
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
The documentation for this class was generated from the following file: