19 declare(strict_types=1);
42 $this->db = $DIC[
'ilDB'];
43 $this->server_id = $a_server_id;
52 return self::$instances[$a_server_id] ?? (self::$instances[$a_server_id] =
new ilECSParticipantSettings($a_server_id));
61 $query =
'SELECT mid FROM ecs_part_settings ' .
62 'WHERE sid = ' . $this->db->quote($this->server_id,
'integer');
63 $res = $this->db->query($query);
67 $mids[] = (
int) $row->mid;
79 $query =
'SELECT mid FROM ecs_part_settings ' .
80 'WHERE sid = ' . $this->db->quote($this->server_id,
'integer') .
' ' .
82 $res = $this->db->query($query);
84 return (
int) $row->mid;
102 $query =
'SELECT * FROM ecs_part_settings ' .
103 'WHERE sid = ' . $this->db->quote($this->
getServerId(),
'integer') .
' ';
104 $res = $this->db->query($query);
106 $this->export[$row->mid] = $row->export;
107 $this->
import[$row->mid] = $row->import;
116 foreach ($a_mids as $mid) {
117 if ($this->
import[$mid]) {
132 foreach ($this->export as $mid => $enabled) {
149 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.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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.