24 include_once
"./Services/Object/classes/class.ilObjectAccess.php";
25 include_once
'./Services/AccessControl/interfaces/interface.ilConditionHandling.php';
45 include_once
'./Services/AccessControl/classes/class.ilConditionHandler.php';
60 public static function checkCondition($a_svy_id,$a_operator,$a_value,$a_usr_id)
65 include_once(
"./Modules/Survey/classes/class.ilObjSurveyAccess.php");
97 function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
101 if ($a_user_id ==
"")
103 $a_user_id = $ilUser->getId();
106 $is_admin = $rbacsystem->checkAccessOfUser($a_user_id,
'write',$a_ref_id);
109 if(!self::_lookupOnline($a_obj_id) && !$is_admin)
115 switch ($a_permission)
177 array(
"permission" =>
"read",
"cmd" =>
"infoScreen",
"lang_var" =>
"svy_run",
"default" =>
true),
178 array(
"permission" =>
"write",
"cmd" =>
"questionsrepo",
"lang_var" =>
"edit_questions"),
179 array(
"permission" =>
"write",
"cmd" =>
"properties",
"lang_var" =>
"settings"),
180 array(
"permission" =>
"read",
"cmd" =>
"evaluation",
"lang_var" =>
"svy_results")
197 $result = $ilDB->queryF(
"SELECT * FROM svy_svy WHERE obj_fi=%s",
206 if (!
$row[
"complete"])
220 $result = $ilDB->queryF(
"SELECT * FROM svy_svy WHERE obj_fi=%s",
229 return $row[
"evaluation_access"];
236 $result = $ilDB->queryF(
"SELECT finished_id FROM svy_finished WHERE user_fi = %s AND survey_fi = %s",
237 array(
'integer',
'integer'),
238 array($user_id, $survey_id)
240 return (
$result->numRows() == 1) ?
true :
false;
247 $result = $ilDB->queryF(
"SELECT anonymize FROM svy_svy WHERE obj_fi = %s",
254 return $row[
"anonymize"];
265 switch ($evaluation_access)
273 if (($user_id > 0) && ($user_id != ANONYMOUS_USER_ID))
283 if(!self::_lookup360Mode($a_obj_id))
293 $result = $ilDB->queryF(
"SELECT survey_id FROM svy_svy WHERE obj_fi = %s",
311 include_once
"Modules/Survey/classes/class.ilObjSurvey.php";
314 switch($svy->get360Results())
320 return $svy->isAppraiseeClosed($user_id);
323 return $svy->isAppraisee($user_id);
337 $result = $ilDB->queryF(
"SELECT * FROM svy_svy WHERE obj_fi=%s",
345 return $row[
"status"];
358 if (!strlen($a_user_id)) $a_user_id = $ilUser->getId();
360 $result = $ilDB->queryF(
"SELECT * FROM svy_svy WHERE obj_fi = %s",
367 if (
$row->anonymize == 1)
369 $result = $ilDB->queryF(
"SELECT * FROM svy_finished, svy_anonymous WHERE svy_finished.survey_fi = %s ".
370 "AND svy_finished.survey_fi = svy_anonymous.survey_fi AND svy_anonymous.user_key = %s ".
371 "AND svy_anonymous.survey_key = svy_finished.anonymous_id",
372 array(
'integer',
'text'),
378 $result = $ilDB->queryF(
"SELECT * FROM svy_finished WHERE survey_fi = %s AND user_fi = %s",
379 array(
'integer',
'integer'),
385 $foundrow = $ilDB->fetchAssoc(
$result);
386 $finished = (int)$foundrow[
"state"];
397 $result = $ilDB->queryF(
"SELECT mode_360 FROM svy_svy".
398 " WHERE obj_fi = %s AND mode_360 = %s",
399 array(
'integer',
'integer'),
402 return (
bool)$ilDB->numRows(
$result);
412 $t_arr = explode(
"_", $a_target);
414 if ($t_arr[0] !=
"svy" || ((
int) $t_arr[1]) <= 0)
420 if (
$_GET[
"accesscode"])
422 include_once
"Modules/Survey/classes/class.ilObjSurvey.php";
429 if ($ilAccess->checkAccess(
"visible",
"", $t_arr[1]) ||
430 $ilAccess->checkAccess(
"read",
"", $t_arr[1]))
static _getCommands()
get commands
static _isSurveyParticipant($user_id, $survey_id)
static _lookupEvaluationAccess($a_obj_id)
get evaluation access
static validateExternalRaterCode($a_ref_id, $a_code)
const IL_NO_OBJECT_ACCESS
static _lookupAnonymize($a_obj_id)
Interface for condition handling.
static getConditionOperators()
Get possible conditions operators.
_checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
Checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAcce...
static checkCondition($a_svy_id, $a_operator, $a_value, $a_usr_id)
check condition
Create styles array
The data for the language used.
static _lookupFinished($a_obj_id, $a_user_id="")
get finished status
static _hasEvaluationAccess($a_obj_id, $user_id)
static _lookup360Mode($a_obj_id)
static _checkGoto($a_target)
check whether goto script will succeed
static _lookupCreationComplete($a_obj_id)
checks wether all necessary parts of the survey are given
static _lookupOnline($a_obj_id)
get status