25 include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
26 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
41 private $mode = self::MODE_SOAP;
61 parent::__construct();
63 $this->EXPORT_VERSION =
"3";
72 $this->mode = $a_mode;
82 if ($this->
getMode() == self::MODE_SOAP) {
88 if ($this->attach_users) {
92 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
96 } elseif ($this->
getMode() == self::MODE_EXPORT) {
102 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
117 $this->
xmlSetDtdDef(
"<!DOCTYPE group PUBLIC \"-//ILIAS//DTD Group//EN\" \"" . ILIAS_HTTP_PATH .
"/xml/ilias_group_3_10.dtd\">");
118 $this->
xmlSetGenCmt(
"Export of ILIAS group " . $this->group_obj->getId() .
" of installation " . $this->
ilias->getSetting(
'inst_id') .
".");
131 $attrs[
"exportVersion"] = $this->EXPORT_VERSION;
132 $attrs[
"id"] =
"il_" . $this->
ilias->getSetting(
'inst_id') .
'_grp_' . $this->group_obj->getId();
134 switch ($this->group_obj->readGroupStatus()) {
136 $attrs[
'type'] =
'open';
141 $attrs[
'type'] =
'closed';
150 $this->
xmlElement(
'title', null, $this->group_obj->getTitle());
152 if ($desc = $this->group_obj->getDescription()) {
153 $this->
xmlElement(
'description', null, $desc);
156 $attr[
'id'] =
'il_' . $this->
ilias->getSetting(
'inst_id') .
'_usr_' . $this->group_obj->getOwner();
159 $this->
xmlElement(
'information', null, $this->group_obj->getInformation());
168 $this->group_obj->getStart() instanceof
ilDate &&
169 $this->group_obj->getEnd() instanceof
ilDate 183 switch ($this->group_obj->getRegistrationType()) {
185 $attrs[
'type'] =
'direct';
188 $attrs[
'type'] =
'confirmation';
191 $attrs[
'type'] =
'password';
196 $attrs[
'type'] =
'disabled';
199 $attrs[
'waitingList'] = $this->group_obj->isWaitingListEnabled() ?
'Yes' :
'No';
203 if (strlen($pwd = $this->group_obj->getPassword())) {
209 if (!$this->group_obj->isRegistrationUnlimited()) {
213 $this->
xmlEndTag(
'temporarilyAvailable');
218 $attrs[
'enabled'] = $this->group_obj->isMembershipLimited() ?
'Yes' :
'No';
219 $this->
xmlElement(
'maxMembers', $attrs, $this->group_obj->getMaxMembers());
220 $this->
xmlElement(
'minMembers', null, (
int) $this->group_obj->getMinMembers());
221 $this->
xmlElement(
'WaitingListAutoFill', null, (
int) $this->group_obj->hasWaitingListAutoFill());
222 $this->
xmlElement(
'CancellationEnd', null, ($this->group_obj->getCancellationEnd() && !$this->group_obj->getCancellationEnd()->isNull()) ? $this->group_obj->getCancellationEnd()->get(
IL_CAL_UNIX) : null);
224 $this->
xmlElement(
'mailMembersType', null, (
string) $this->group_obj->getMailToMembersType());
234 $this->
xmlElement(
'showMembers', null, $this->group_obj->getShowMembers());
239 $admins = $this->group_obj->getGroupAdminIds();
240 $admins =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
243 $this->group_obj->getRefId(),
247 foreach ($admins as
$id) {
248 $attr[
'id'] =
'il_' . $this->
ilias->getSetting(
'inst_id') .
'_usr_' .
$id;
249 $attr[
'notification'] = $this->participants->isNotificationEnabled($id) ?
'Yes' :
'No';
258 $members = $this->group_obj->getGroupMemberIds();
259 $members =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
262 $this->group_obj->getRefId(),
265 foreach ($members as
$id) {
266 if (!$this->group_obj->isAdmin($id)) {
267 $attr[
'id'] =
'il_' . $this->
ilias->getSetting(
'inst_id') .
'_usr_' .
$id;
282 $this->attach_users = $value ? true :
false;
static _exportContainerSettings(ilXmlWriter $a_xml, $a_obj_id)
__construct($group_obj)
constructor
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
xmlSetGenCmt($genCmt)
Sets generated comment.
const GRP_REGISTRATION_DEACTIVATED
xmlSetDtdDef($dtdDef)
Sets dtd definition.
xmlDumpMem($format=true)
Returns xml document from memory.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
if(!array_key_exists('StateId', $_REQUEST)) $id
__buildGroup()
Group start.
const GRP_REGISTRATION_PASSWORD
const GRP_REGISTRATION_REQUEST
xmlEndTag($tag)
Writes an endtag.
redirection script todo: (a better solution should control the processing via a xml file) ...
xmlHeader()
Writes xml header public.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
Create styles array
The data for the language used.
__buildPeriod()
Build group period.
xmlElement($tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
__buildExtraSettings()
Build extra settings, like "show member list".
static _exportContainerSortingSettings(ilXmlWriter $xml, $obj_id)
sorting XML-export for all container objects
const GRP_REGISTRATION_DIRECT
__buildTitleDescription()