XML writer class. More...
Public Member Functions | |
ilGroupXMLWriter (&$group_obj) | |
constructor | |
start () | |
getXML () | |
__buildHeader () | |
__buildTitleDescription () | |
__buildRegistration () | |
__buildAdmin () | |
__buildMember () | |
__buildFooter () | |
Data Fields | |
$ilias | |
$xml | |
$group_obj |
XML writer class.
Class for writing xml export versions of courses
Definition at line 36 of file class.ilGroupXMLWriter.php.
ilGroupXMLWriter::__buildAdmin | ( | ) |
Definition at line 133 of file class.ilGroupXMLWriter.php.
References $id, and ilXmlWriter::xmlElement().
Referenced by start().
{ foreach($this->group_obj->getGroupAdminIds() as $id) { $attr['id'] = 'il_'.$this->ilias->getSetting('inst_id').'_usr_'.$id; $this->xmlElement('admin',$attr); } return true; }
ilGroupXMLWriter::__buildFooter | ( | ) |
Definition at line 158 of file class.ilGroupXMLWriter.php.
References ilXmlWriter::xmlEndTag().
Referenced by start().
{ $this->xmlEndTag('group'); }
ilGroupXMLWriter::__buildHeader | ( | ) |
Definition at line 78 of file class.ilGroupXMLWriter.php.
References ilXmlWriter::xmlHeader(), ilXmlWriter::xmlSetDtdDef(), ilXmlWriter::xmlSetGenCmt(), and ilXmlWriter::xmlStartTag().
Referenced by start().
{ $this->xmlSetDtdDef("<!DOCTYPE Group SYSTEM \"http://www.ilias.uni-koeln.de/download/dtd/ilias_group_0_1.dtd\">"); $this->xmlSetGenCmt("Export of ILIAS group ". $this->group_obj->getId()." of installation ".$this->ilias->getSetting('inst_id')."."); $this->xmlHeader(); $attrs["exportVersion"] = $this->EXPORT_VERSION; $attrs["id"] = "il_".$this->ilias->getSetting('inst_id').'_grp_'.$this->group_obj->getId(); $attrs['type'] = $this->group_obj->getGroupStatus() ? 'open' : 'closed'; $this->xmlStartTag("group", $attrs); return true; }
ilGroupXMLWriter::__buildMember | ( | ) |
Definition at line 144 of file class.ilGroupXMLWriter.php.
References $id, and ilXmlWriter::xmlElement().
Referenced by start().
{ foreach($this->group_obj->getGroupMemberIds() as $id) { if(!$this->group_obj->isAdmin($id)) { $attr['id'] = 'il_'.$this->ilias->getSetting('inst_id').'_usr_'.$id; $this->xmlElement('member',$attr); } } return true; }
ilGroupXMLWriter::__buildRegistration | ( | ) |
Definition at line 106 of file class.ilGroupXMLWriter.php.
References ilXmlWriter::xmlElement(), ilXmlWriter::xmlEndTag(), and ilXmlWriter::xmlStartTag().
Referenced by start().
{ switch($this->group_obj->getRegistrationFlag()) { case '0': $attr['type'] = 'disabled'; break; case '1': $attr['type'] = 'enabled'; break; case '2': $attr['type'] = 'password'; break; } $this->xmlStartTag('registration',$attr); if(strlen($pwd = $this->group_obj->getPassword())) { $this->xmlElement('password',null,$pwd); } if($timest = $this->group_obj->getExpirationTimestamp()) { $this->xmlElement('expiration',null,$timest); } $this->xmlEndTag('registration'); }
ilGroupXMLWriter::__buildTitleDescription | ( | ) |
Definition at line 93 of file class.ilGroupXMLWriter.php.
References ilXmlWriter::xmlElement().
Referenced by start().
{ $this->xmlElement('title',null,$this->group_obj->getTitle()); if($desc = $this->group_obj->getDescription()) { $this->xmlElement('description',null,$desc); } $attr['id'] = 'il_'.$this->ilias->getSetting('inst_id').'_usr_'.$this->group_obj->getOwner(); $this->xmlElement('owner',$attr); }
ilGroupXMLWriter::getXML | ( | ) |
Definition at line 72 of file class.ilGroupXMLWriter.php.
References ilXmlWriter::xmlDumpMem().
{ return $this->xmlDumpMem(FALSE); }
ilGroupXMLWriter::ilGroupXMLWriter | ( | &$ | group_obj | ) |
constructor
string | xml version | |
string | output encoding | |
string | input encoding public |
Definition at line 50 of file class.ilGroupXMLWriter.php.
References $group_obj, $ilias, and ilXmlWriter::ilXmlWriter().
{ global $ilias; parent::ilXmlWriter(); $this->EXPORT_VERSION = "2"; $this->ilias =& $ilias; $this->group_obj =& $group_obj; }
ilGroupXMLWriter::start | ( | ) |
Definition at line 62 of file class.ilGroupXMLWriter.php.
References __buildAdmin(), __buildFooter(), __buildHeader(), __buildMember(), __buildRegistration(), and __buildTitleDescription().
{ $this->__buildHeader(); $this->__buildTitleDescription(); $this->__buildRegistration(); $this->__buildAdmin(); $this->__buildMember(); $this->__buildFooter(); }
ilGroupXMLWriter::$group_obj |
Definition at line 41 of file class.ilGroupXMLWriter.php.
Referenced by ilGroupXMLWriter().
ilGroupXMLWriter::$ilias |
Definition at line 38 of file class.ilGroupXMLWriter.php.
Referenced by ilGroupXMLWriter().
ilGroupXMLWriter::$xml |
Definition at line 40 of file class.ilGroupXMLWriter.php.