4 include_once(
"./Services/Object/classes/class.ilObjectAccess.php");
5 include_once
'./Services/AccessControl/interfaces/interface.ilConditionHandling.php';
24 include_once
'./Services/AccessControl/classes/class.ilConditionHandler.php';
40 public static function checkCondition($a_exc_id, $a_operator, $a_value, $a_usr_id)
42 include_once
'./Services/AccessControl/classes/class.ilConditionHandler.php';
43 include_once
'./Modules/Exercise/classes/class.ilExerciseMembers.php';
45 switch ($a_operator) {
79 array(
"permission" =>
"read",
"cmd" =>
"showOverview",
"lang_var" =>
"show",
81 array(
"permission" =>
"write",
"cmd" =>
"listAssignments",
"lang_var" =>
"edit_assignments"),
82 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"settings")
92 $ilDB = $DIC->database();
99 $q =
"SELECT id, time_stamp, deadline2, peer_dl" .
100 " FROM exc_assignment WHERE exc_id = " .
$ilDB->quote($a_obj_id,
"integer") .
101 " AND (time_stamp > " .
$ilDB->quote(
time(),
"integer") .
102 " OR (peer_dl > " .
$ilDB->quote(
time(),
"integer") .
103 " AND peer > " .
$ilDB->quote(0,
"integer") .
"))";
104 $set =
$ilDB->query($q);
107 (
$row[
"time_stamp"] < $dl || !$dl)) {
108 $dl =
$row[
"time_stamp"];
118 (
$row[
"peer_dl"] < $dl || !$dl)) {
119 $dl =
$row[
"peer_dl"];
121 $cnt[
$row[
"id"]] =
true;
132 "cnt" =>
sizeof($cnt)
143 $ilAccess = $DIC->access();
145 $t_arr = explode(
"_", $a_target);
147 if ($t_arr[0] !=
"exc" || ((
int) $t_arr[1]) <= 0) {
151 if ($ilAccess->checkAccess(
"read",
"", $t_arr[1])) {
173 preg_match(
"/\\/poll_([\\d]*)\\//uism", $ilWACPath->
getPath(),
$results);
176 if ($ilAccess->checkAccess(
'read',
'', $ref_id)) {
static _checkGoto($a_target)
check whether goto script will succeed
static getConditionOperators()
Get possible conditions operators.
Interface for condition handling.
canBeDelivered(ilWACPath $ilWACPath)
static checkCondition($a_exc_id, $a_operator, $a_value, $a_usr_id)
check condition
static _getAllReferences($a_id)
static _lookupStatus($a_obj_id, $a_user_id)
Lookup current status (notgraded|passed|failed)
static period2String(ilDateTime $a_from, $a_to=null)
Return a string of time period.
static _lookupRemainingWorkingTimeString($a_obj_id)
Create styles array
The data for the language used.
Class ilObjExerciseAccess.
static _getCommands()
get commands
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.