18 declare(strict_types=1);
41 $this->db = $DIC[
'ilDB'];
42 $this->server_id = $a_server_id;
51 return self::$instances[$a_server_id] ?? (self::$instances[$a_server_id] =
new ilECSParticipantSettings($a_server_id));
60 $query =
'SELECT mid FROM ecs_part_settings ' .
61 'WHERE sid = ' . $this->db->quote($this->server_id,
'integer');
66 $mids[] = (
int) $row->mid;
78 $query =
'SELECT mid FROM ecs_part_settings ' .
79 'WHERE sid = ' . $this->db->quote($this->server_id,
'integer') .
' ' .
83 return (
int) $row->mid;
99 private function read(): void
101 $query =
'SELECT * FROM ecs_part_settings ' .
102 'WHERE sid = ' . $this->db->quote($this->
getServerId(),
'integer') .
' ';
105 $this->export[$row->mid] = $row->export;
106 $this->
import[$row->mid] = $row->import;
115 foreach ($a_mids as $mid) {
116 if ($this->
import[$mid]) {
131 foreach ($this->export as $mid =>
$enabled) {
148 return $this->export[$a_mid] ? true :
false;
static getInstanceByServerId(int $a_server_id)
Get instance by server id.
getServerId()
Get server id.
isEnabled($a_mid)
is participant enabled
lookupCmsMid()
Lookup mid of current cms participant.
getAvailabeMids()
Get all available mids.
__construct(int $a_server_id)
Constructor (Singleton)
getEnabledParticipants()
get number of participants that are enabled
isImportAllowed(array $a_mids)
Check if import is allowed for specific mid.