25 include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
26 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
41 private $mode = self::MODE_SOAP;
63 parent::__construct();
65 $this->EXPORT_VERSION =
"3";
74 $this->mode = $a_mode;
84 if ($this->
getMode() == self::MODE_SOAP) {
92 if ($this->attach_users) {
96 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
100 } elseif ($this->
getMode() == self::MODE_EXPORT) {
108 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
123 $this->
xmlSetDtdDef(
"<!DOCTYPE group PUBLIC \"-//ILIAS//DTD Group//EN\" \"" . ILIAS_HTTP_PATH .
"/xml/ilias_group_3_10.dtd\">");
124 $this->
xmlSetGenCmt(
"Export of ILIAS group " . $this->group_obj->getId() .
" of installation " . $this->
ilias->getSetting(
'inst_id') .
".");
137 $attrs[
"exportVersion"] = $this->EXPORT_VERSION;
138 $attrs[
"id"] =
"il_" . $this->
ilias->getSetting(
'inst_id') .
'_grp_' . $this->group_obj->getId();
140 switch ($this->group_obj->readGroupStatus()) {
142 $attrs[
'type'] =
'open';
147 $attrs[
'type'] =
'closed';
160 $md2xml =
new ilMD2XML($this->group_obj->getId(), $this->group_obj->getId(),
'grp');
181 $this->
xmlElement(
'title', null, $this->group_obj->getTitle());
183 if ($desc = $this->group_obj->getDescription()) {
184 $this->
xmlElement(
'description', null, $desc);
187 $attr[
'id'] =
'il_' . $this->
ilias->getSetting(
'inst_id') .
'_usr_' . $this->group_obj->getOwner();
190 $this->
xmlElement(
'information', null, $this->group_obj->getInformation());
199 $this->group_obj->getStart() instanceof
ilDate &&
200 $this->group_obj->getEnd() instanceof
ilDate 214 switch ($this->group_obj->getRegistrationType()) {
216 $attrs[
'type'] =
'direct';
219 $attrs[
'type'] =
'confirmation';
222 $attrs[
'type'] =
'password';
227 $attrs[
'type'] =
'disabled';
230 $attrs[
'waitingList'] = $this->group_obj->isWaitingListEnabled() ?
'Yes' :
'No';
234 if (strlen($pwd = $this->group_obj->getPassword())) {
240 if (!$this->group_obj->isRegistrationUnlimited()) {
244 $this->
xmlEndTag(
'temporarilyAvailable');
249 $attrs[
'enabled'] = $this->group_obj->isMembershipLimited() ?
'Yes' :
'No';
250 $this->
xmlElement(
'maxMembers', $attrs, $this->group_obj->getMaxMembers());
251 $this->
xmlElement(
'minMembers', null, (
int) $this->group_obj->getMinMembers());
252 $this->
xmlElement(
'WaitingListAutoFill', null, (
int) $this->group_obj->hasWaitingListAutoFill());
253 $this->
xmlElement(
'CancellationEnd', null, ($this->group_obj->getCancellationEnd() && !$this->group_obj->getCancellationEnd()->isNull()) ? $this->group_obj->getCancellationEnd()->get(
IL_CAL_UNIX) : null);
255 $this->
xmlElement(
'mailMembersType', null, (
string) $this->group_obj->getMailToMembersType());
265 $this->
xmlElement(
'showMembers', null, $this->group_obj->getShowMembers());
270 $admins = $this->group_obj->getGroupAdminIds();
271 $admins =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
274 $this->group_obj->getRefId(),
278 foreach ($admins as
$id) {
279 $attr[
'id'] =
'il_' . $this->
ilias->getSetting(
'inst_id') .
'_usr_' .
$id;
280 $attr[
'notification'] = $this->participants->isNotificationEnabled($id) ?
'Yes' :
'No';
289 $members = $this->group_obj->getGroupMemberIds();
290 $members =
$GLOBALS[
'DIC']->access()->filterUserIdsByRbacOrPositionOfCurrentUser(
293 $this->group_obj->getRefId(),
296 foreach ($members as
$id) {
297 if (!$this->group_obj->isAdmin($id)) {
298 $attr[
'id'] =
'il_' . $this->
ilias->getSetting(
'inst_id') .
'_usr_' .
$id;
313 $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.
if(!array_key_exists('StateId', $_REQUEST)) $id
__buildGroup()
Group start.
static _appendXMLByObjId(ilXmlWriter $a_xml_writer, $a_obj_id)
Get xml of object values.
__buildMetaData()
write lom meta data
const GRP_REGISTRATION_PASSWORD
__buildAdvancedMetaData()
Build advanced meta data.
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.
__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
appendXML($a_str)
append xml string to document
const GRP_REGISTRATION_DIRECT
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
__buildTitleDescription()