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";
73 $this->mode = $a_mode;
83 if($this->
getMode() == self::MODE_SOAP)
89 if ($this->attach_users)
94 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
99 elseif($this->
getMode() == self::MODE_EXPORT)
104 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
120 $this->
xmlSetDtdDef(
"<!DOCTYPE group PUBLIC \"-//ILIAS//DTD Group//EN\" \"".ILIAS_HTTP_PATH.
"/xml/ilias_group_3_10.dtd\">");
121 $this->
xmlSetGenCmt(
"Export of ILIAS group ". $this->group_obj->getId().
" of installation ".$this->
ilias->getSetting(
'inst_id').
".");
134 $attrs[
"exportVersion"] = $this->EXPORT_VERSION;
135 $attrs[
"id"] =
"il_".$this->ilias->getSetting(
'inst_id').
'_grp_'.$this->group_obj->getId();
137 switch($this->group_obj->readGroupStatus())
140 $attrs[
'type'] =
'open';
145 $attrs[
'type'] =
'closed';
154 $this->
xmlElement(
'title',null,$this->group_obj->getTitle());
156 if($desc = $this->group_obj->getDescription())
161 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$this->group_obj->getOwner();
164 $this->
xmlElement(
'information',null,$this->group_obj->getInformation());
171 switch($this->group_obj->getRegistrationType())
174 $attrs[
'type'] =
'direct';
177 $attrs[
'type'] =
'confirmation';
180 $attrs[
'type'] =
'password';
185 $attrs[
'type'] =
'disabled';
188 $attrs[
'waitingList'] = $this->group_obj->isWaitingListEnabled() ?
'Yes' :
'No';
192 if(strlen($pwd = $this->group_obj->getPassword()))
199 if(!$this->group_obj->isRegistrationUnlimited())
204 $this->
xmlEndTag(
'temporarilyAvailable');
209 $attrs[
'enabled'] = $this->group_obj->isMembershipLimited() ?
'Yes' :
'No';
210 $this->
xmlElement(
'maxMembers',$attrs,$this->group_obj->getMaxMembers());
211 $this->
xmlElement(
'minMembers',null,(
int)$this->group_obj->getMinMembers());
212 $this->
xmlElement(
'WaitingListAutoFill',null,(
int)$this->group_obj->hasWaitingListAutoFill());
213 $this->
xmlElement(
'CancellationEnd',null,($this->group_obj->getCancellationEnd() && !$this->group_obj->getCancellationEnd()->isNull()) ? $this->group_obj->getCancellationEnd()->get(
IL_CAL_UNIX) : null);
215 $this->
xmlElement(
'mailMembersType', null, (
string) $this->group_obj->getMailToMembersType());
222 foreach($this->group_obj->getGroupAdminIds() as $id)
224 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
225 $attr[
'notification'] = $this->participants->isNotificationEnabled($id) ?
'Yes' :
'No';
234 foreach($this->group_obj->getGroupMemberIds() as $id)
236 if(!$this->group_obj->isAdmin($id))
238 $attr[
'id'] =
'il_'.$this->ilias->getSetting(
'inst_id').
'_usr_'.$id;
252 $this->attach_users = $value ? true :
false;
static _exportContainerSettings(ilXmlWriter $a_xml, $a_obj_id)
__construct($group_obj)
constructor
xmlSetGenCmt($genCmt)
Sets generated comment.
const GRP_REGISTRATION_DEACTIVATED
xmlSetDtdDef($dtdDef)
Sets dtd definition.
xmlStartTag($tag, $attrs=NULL, $empty=FALSE, $encode=TRUE, $escape=TRUE)
Writes a starttag.
__buildGroup()
Group start.
xmlElement($tag, $attrs=NULL, $data=Null, $encode=TRUE, $escape=TRUE)
Writes a basic element (no children, just textual content)
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.
static _exportContainerSortingSettings(ilXmlWriter $xml, $obj_id)
sorting XML-export for all container objects
const GRP_REGISTRATION_DIRECT
xmlDumpMem($format=TRUE)
Returns xml document from memory.
__buildTitleDescription()