Public Member Functions | Data Fields

ilGroupXMLWriter Class Reference

XML writer class. More...

Inheritance diagram for ilGroupXMLWriter:
Collaboration diagram for ilGroupXMLWriter:

Public Member Functions

 ilGroupXMLWriter (&$group_obj)
 constructor
 start ()
 getXML ()
 __buildHeader ()
 __buildTitleDescription ()
 __buildRegistration ()
 __buildAdmin ()
 __buildMember ()
 __buildFooter ()

Data Fields

 $ilias
 $xml
 $group_obj

Detailed Description

XML writer class.

Class for writing xml export versions of courses

Author:
Stefan Meyer <smeyer@databay.de>
Version:
Id:
class.ilGroupXMLWriter.php 14287 2007-07-09 15:58:04Z rkuester

Definition at line 36 of file class.ilGroupXMLWriter.php.


Member Function Documentation

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;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilGroupXMLWriter::__buildFooter (  ) 

Definition at line 158 of file class.ilGroupXMLWriter.php.

References ilXmlWriter::xmlEndTag().

Referenced by start().

        {
                $this->xmlEndTag('group');
        }

Here is the call graph for this function:

Here is the caller graph for this function:

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;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

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;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

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');
        }

Here is the call graph for this function:

Here is the caller graph for this function:

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);
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilGroupXMLWriter::getXML (  ) 

Definition at line 72 of file class.ilGroupXMLWriter.php.

References ilXmlWriter::xmlDumpMem().

        {
                return $this->xmlDumpMem(FALSE);
        }

Here is the call graph for this function:

ilGroupXMLWriter::ilGroupXMLWriter ( &$  group_obj  ) 

constructor

Parameters:
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;
        }

Here is the call graph for this function:

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();
        }

Here is the call graph for this function:


Field Documentation

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.


The documentation for this class was generated from the following file: