19 declare(strict_types=1);
50 return self::DB_TABLE_NAME;
55 return "/campusconnect/groups";
65 $this->availability_type = $a_type;
85 $this->start = $a_time;
105 $this->end = $a_time;
128 $query =
"SELECT * FROM " . self::DB_TABLE_NAME .
129 " WHERE obj_id = " . $ilDB->quote($a_obj_id,
'integer') .
" ";
130 $res = $ilDB->query($query);
132 switch ($row->availability_type) {
133 case self::ACTIVATION_UNLIMITED:
136 case self::ACTIVATION_OFFLINE:
139 case self::ACTIVATION_LIMITED:
140 return time() > $row->r_start && time < $row->r_end;
151 $a_fields[
"availability_type"] = array(
"integer", 0);
152 $a_fields[
"availability_start"] = array(
"integer", 0);
153 $a_fields[
"availability_end"] = array(
"integer", 0);
159 $a_fields[
"availability_start"] = array(
"integer", (
int) $this->
getStartingTime());
160 $a_fields[
"availability_end"] = array(
"integer", (
int) $this->
getEndingTime());
getEndingTime()
get ending time
setAvailabilityType($a_type)
Set Availability type.
static _lookupOnline($a_obj_id)
Lookup online.
getAvailabilityType()
get availability type
getStartingTime()
get starting time
doReadCustomFields($a_row)
doUpdateCustomFields(array &$a_fields)
Remote object app base class.
const ACTIVATION_OFFLINE
Fixed activation.
setEndingTime($a_time)
set ending time
updateCustomFromECSContent(ilECSSetting $a_server, $a_ecs_content)
doCreateCustomFields(array &$a_fields)
const ACTIVATION_UNLIMITED
setStartingTime($a_time)
set starting time