5 include_once(
"./Services/Object/classes/class.ilObjectAccess.php");
6 include_once
'Services/AccessControl/interfaces/interface.ilConditionHandling.php';
25 include_once
'./Services/AccessControl/classes/class.ilConditionHandler.php';
41 public static function checkCondition($a_trigger_obj_id,$a_operator,$a_value,$a_usr_id)
47 include_once
'./Services/Tracking/classes/class.ilLPStatus.php';
53 include_once
'./Services/Tracking/classes/class.ilLPStatus.php';
74 function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
80 $a_user_id = $ilUser->getId();
88 && !$rbacsystem->checkAccessOfUser($a_user_id,
'write',$a_ref_id))
96 switch ($a_permission)
100 (!$rbacsystem->checkAccessOfUser($a_user_id,
'write', $a_ref_id)))
128 array(
"permission" =>
"read",
"cmd" =>
"view",
"lang_var" =>
"show",
"default" =>
true),
129 array(
"permission" =>
"write",
"cmd" =>
"editContent",
"lang_var" =>
"edit_content"),
130 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"settings")
135 if ($offlineMode ==
false) {
136 $commands[]=array(
"permission" =>
"read",
"cmd" =>
"offlineModeStart",
"lang_var" =>
"offline_mode");
139 $commands[]=array(
"permission" =>
"read",
"cmd" =>
"offlineModeStop",
"lang_var" =>
"offline_mode");
140 $commands[0]=array(
"permission" =>
"read",
"cmd" =>
"offlineModeView",
"lang_var" =>
"show",
"default" =>
true);
158 $set = $ilDB->queryF(
'SELECT c_online FROM sahs_lm WHERE id = %s',
159 array(
'integer'), array($a_id));
160 $rec = $ilDB->fetchAssoc($set);
172 $set = $ilDB->queryF(
'SELECT * FROM sahs_lm WHERE id = %s',
173 array(
'integer'), array($a_obj_id));
174 $rec = $ilDB->fetchAssoc($set);
176 return $rec[
"editable"];
187 $t_arr = explode(
"_", $a_target);
189 if ($t_arr[0] !=
"sahs" || ((
int) $t_arr[1]) <= 0)
194 if ($ilAccess->checkAccess(
"visible",
"", $t_arr[1]))
209 $lm_dir = $lm_data_dir.DIRECTORY_SEPARATOR.
"lm_".$a_id;
224 $uid = ($usr_id) ? $usr_id : $ilUser->getId();
228 include_once
"./Services/Certificate/classes/class.ilCertificate.php";
232 include_once
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
234 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
237 include_once
"./Services/Tracking/classes/class.ilLPStatus.php";
246 include_once
"./Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php";
253 include_once
"./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php";
284 $user_id = $ilUser->getId();
286 $set = $ilDB->queryF(
'SELECT offline_mode FROM sahs_user WHERE obj_id = %s AND user_id = %s',
287 array(
'integer',
'integer'),
288 array($a_obj_id, $user_id)
290 $rec = $ilDB->fetchAssoc($set);
291 if ($rec[
"offline_mode"] ==
"offline")
return true;
302 $set = $ilDB->queryF(
'SELECT offline_mode FROM sahs_lm WHERE id = %s',
303 array(
'integer'), array($a_id));
304 $rec = $ilDB->fetchAssoc($set);