24 include_once
"./Services/Object/classes/class.ilObjectAccess.php";
25 include_once
'./Services/AccessControl/interfaces/interface.ilConditionHandling.php';
67 $this->
user = $DIC->user();
68 $this->lng = $DIC->language();
69 $this->rbacsystem = $DIC->rbac()->system();
70 $this->access = $DIC->access();
79 include_once
'./Services/AccessControl/classes/class.ilConditionHandler.php';
94 public static function checkCondition($a_svy_id, $a_operator, $a_value, $a_usr_id)
96 switch ($a_operator) {
98 include_once(
"./Modules/Survey/classes/class.ilObjSurveyAccess.php");
127 public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
134 if ($a_user_id ==
"") {
138 $is_admin =
$rbacsystem->checkAccessOfUser($a_user_id,
'write', $a_ref_id);
141 if (!self::_lookupOnline($a_obj_id) && !$is_admin) {
146 switch ($a_permission) {
199 array(
"permission" =>
"read",
"cmd" =>
"infoScreen",
"lang_var" =>
"svy_run",
"default" =>
true),
200 array(
"permission" =>
"write",
"cmd" =>
"questionsrepo",
"lang_var" =>
"edit_questions"),
201 array(
"permission" =>
"write",
"cmd" =>
"properties",
"lang_var" =>
"settings"),
202 array(
"permission" =>
"read",
"cmd" =>
"evaluation",
"lang_var" =>
"svy_results")
219 $ilDB = $DIC->database();
222 "SELECT * FROM svy_svy WHERE obj_fi=%s",
230 if (!
$row[
"complete"]) {
243 $ilDB = $DIC->database();
246 "SELECT * FROM svy_svy WHERE obj_fi=%s",
254 return $row[
"evaluation_access"];
261 $ilDB = $DIC->database();
264 "SELECT finished_id FROM svy_finished WHERE user_fi = %s AND survey_fi = %s",
265 array(
'integer',
'integer'),
266 array($user_id, $survey_id)
268 return (
$result->numRows() == 1) ?
true :
false;
275 $ilDB = $DIC->database();
278 "SELECT anonymize FROM svy_svy WHERE obj_fi = %s",
284 return $row[
"anonymize"];
293 switch ($evaluation_access) {
300 if (($user_id > 0) && ($user_id != ANONYMOUS_USER_ID)) {
307 if (!self::_lookup360Mode($a_obj_id)) {
319 $ilDB = $DIC->database();
321 "SELECT survey_id FROM svy_svy WHERE obj_fi = %s",
336 include_once
"Modules/Survey/classes/class.ilObjSurvey.php";
339 switch ($svy->get360Results()) {
344 return $svy->isAppraiseeClosed($user_id);
347 return $svy->isAppraisee($user_id);
361 $ilDB = $DIC->database();
364 "SELECT * FROM svy_svy WHERE obj_fi=%s",
372 return $row[
"status"];
384 $ilDB = $DIC->database();
388 if (!strlen($a_user_id)) {
393 "SELECT * FROM svy_svy WHERE obj_fi = %s",
399 if (
$row->anonymize == 1) {
401 "SELECT * FROM svy_finished, svy_anonymous WHERE svy_finished.survey_fi = %s " .
402 "AND svy_finished.survey_fi = svy_anonymous.survey_fi AND svy_anonymous.user_key = %s " .
403 "AND svy_anonymous.survey_key = svy_finished.anonymous_id",
404 array(
'integer',
'text'),
409 "SELECT * FROM svy_finished WHERE survey_fi = %s AND user_fi = %s",
410 array(
'integer',
'integer'),
416 $finished = (int) $foundrow[
"state"];
427 $ilDB = $DIC->database();
430 "SELECT mode_360 FROM svy_svy" .
431 " WHERE obj_fi = %s AND mode_360 = %s",
432 array(
'integer',
'integer'),
445 $ilAccess = $DIC->access();
447 $t_arr = explode(
"_", $a_target);
449 if ($t_arr[0] !=
"svy" || ((
int) $t_arr[1]) <= 0) {
454 if (
$_GET[
"accesscode"]) {
455 include_once
"Modules/Survey/classes/class.ilObjSurvey.php";
461 if ($ilAccess->checkAccess(
"visible",
"", $t_arr[1]) ||
462 $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.
__construct()
Constructor.
_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