5 include_once(
"./Services/Object/classes/class.ilObjectAccess.php");
30 function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
36 $a_user_id = $ilUser->getId();
44 && !$rbacsystem->checkAccessOfUser($a_user_id,
'write',$a_ref_id))
52 switch ($a_permission)
56 (!$rbacsystem->checkAccessOfUser($a_user_id,
'write', $a_ref_id)))
84 array(
"permission" =>
"read",
"cmd" =>
"view",
"lang_var" =>
"show",
"default" =>
true),
85 array(
"permission" =>
"write",
"cmd" =>
"editContent",
"lang_var" =>
"edit_content"),
86 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"settings")
91 if ($offlineMode ==
false) {
92 $commands[]=array(
"permission" =>
"read",
"cmd" =>
"offlineModeStart",
"lang_var" =>
"offline_mode");
95 $commands[]=array(
"permission" =>
"read",
"cmd" =>
"offlineModeStop",
"lang_var" =>
"offline_mode");
96 $commands[0]=array(
"permission" =>
"read",
"cmd" =>
"offlineModeView",
"lang_var" =>
"show",
"default" =>
true);
114 $set = $ilDB->queryF(
'SELECT c_online FROM sahs_lm WHERE id = %s',
115 array(
'integer'), array($a_id));
116 $rec = $ilDB->fetchAssoc($set);
128 $set = $ilDB->queryF(
'SELECT * FROM sahs_lm WHERE id = %s',
129 array(
'integer'), array($a_obj_id));
130 $rec = $ilDB->fetchAssoc($set);
132 return $rec[
"editable"];
143 $t_arr = explode(
"_", $a_target);
145 if ($t_arr[0] !=
"sahs" || ((
int) $t_arr[1]) <= 0)
150 if ($ilAccess->checkAccess(
"visible",
"", $t_arr[1]))
165 $lm_dir = $lm_data_dir.DIRECTORY_SEPARATOR.
"lm_".$a_id;
184 include_once
"./Services/Certificate/classes/class.ilCertificate.php";
188 include_once
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
190 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
193 include_once
"./Services/Tracking/classes/class.ilLPStatus.php";
202 include_once
"./Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php";
209 include_once
"./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php";
240 $user_id = $ilUser->getId();
242 $set = $ilDB->queryF(
'SELECT offline_mode FROM sahs_user WHERE obj_id = %s AND user_id = %s',
243 array(
'integer',
'integer'),
244 array($a_obj_id, $user_id)
246 $rec = $ilDB->fetchAssoc($set);
247 if ($rec[
"offline_mode"] ==
"offline")
return true;
258 $set = $ilDB->queryF(
'SELECT offline_mode FROM sahs_lm WHERE id = %s',
259 array(
'integer'), array($a_id));
260 $rec = $ilDB->fetchAssoc($set);