40 public static function checkCondition(
int $a_trigger_obj_id,
string $a_operator,
string $a_value,
int $a_usr_id): bool
42 switch ($a_operator) {
70 array(
"permission" =>
"read",
"cmd" =>
"showOverview",
"lang_var" =>
"show",
72 array(
"permission" =>
"write",
"cmd" =>
"listAssignments",
"lang_var" =>
"edit_assignments"),
73 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"settings")
85 $ilDB = $DIC->database();
92 $q =
"SELECT id, time_stamp, deadline2, peer_dl" .
93 " FROM exc_assignment WHERE exc_id = " .
$ilDB->quote($a_obj_id,
"integer") .
94 " AND (time_stamp > " .
$ilDB->quote(time(),
"integer") .
95 " OR (peer_dl > " .
$ilDB->quote(time(),
"integer") .
96 " AND peer > " .
$ilDB->quote(0,
"integer") .
"))";
97 $set =
$ilDB->query($q);
98 while ($row =
$ilDB->fetchAssoc($set)) {
99 if ($row[
"time_stamp"] > time() &&
100 ($row[
"time_stamp"] < $dl || !$dl)) {
101 $dl = $row[
"time_stamp"];
110 if ($row[
"peer_dl"] > time() &&
111 ($row[
"peer_dl"] < $dl || !$dl)) {
112 $dl = $row[
"peer_dl"];
114 $cnt[$row[
"id"]] =
true;
136 $ilAccess = $DIC->access();
138 $t_arr = explode(
"_", $a_target);
140 if ($t_arr[0] !=
"exc" || ((
int) $t_arr[1]) <= 0) {
143 return $ilAccess->checkAccess(
"read",
"", $t_arr[1]) ||
144 $ilAccess->checkAccess(
"visible",
"", $t_arr[1]);
static _checkGoto($a_target)
check whether goto script will succeed
static getConditionOperators()
Get possible conditions operators.
Interface for condition handling.
canBeDelivered(ilWACPath $ilWACPath)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupStatus(int $a_obj_id, int $a_user_id)
Lookup current status (notgraded|passed|failed)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getCommands()
get commands
static checkCondition(int $a_trigger_obj_id, string $a_operator, string $a_value, int $a_usr_id)
check condition
static _lookupRemainingWorkingTimeString(int $a_obj_id)