Public Member Functions | Data Fields

ilPDFPresentation Class Reference

Inheritance diagram for ilPDFPresentation:
Collaboration diagram for ilPDFPresentation:

Public Member Functions

 ilPDFPresentation ($a_mode, $a_ref_id, $a_user_id=0)
executeCommand ()
 execute command
 setType ($a_type)
 getType ()
 __init ()
 createList ()
 __createPersonalProgressList ()
 __addFilter ()
 __addMain ()
 __convert ()

Data Fields

 $type = ''

Detailed Description

Definition at line 42 of file class.ilPDFPresentation.php.


Member Function Documentation

ilPDFPresentation::__addFilter (  ) 

Definition at line 126 of file class.ilPDFPresentation.php.

References $ilObjDataCache, and $ilUser.

Referenced by __createPersonalProgressList().

        {
                global $ilUser,$ilObjDataCache;

                $filter = new ilLPFilter($ilUser->getId());
                
                $this->xml_tpl->setCurrentBlock("filter");
                $this->xml_tpl->setVariable("TXT_FILTER",$this->lng->txt('trac_lp_filter'));
                $this->xml_tpl->setVariable("TXT_OBJECT_TYPES",$this->lng->txt('obj_types'));
                $this->xml_tpl->setVariable("OBJECT_TYPES",$this->lng->txt('objs_'.$filter->getFilterType()));
                $this->xml_tpl->setVariable("TXT_AREA",$this->lng->txt('trac_filter_area'));
                $this->xml_tpl->setVariable("FILTER_LANG",$ilUser->getLanguage());
                if($filter->getRootNode() == ROOT_FOLDER_ID)
                {
                        $this->xml_tpl->setVariable("AREA",$this->lng->txt('trac_filter_repository'));
                }
                else
                {
                        $text = $this->lng->txt('trac_below')." '";
                        $text .= $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($filter->getRootNode()));
                        $text .= "'";
                        $this->xml_tpl->setVariable("AREA",$text);
                }
                $this->xml_tpl->setVariable("TXT_TITLE_DESC",$this->lng->txt('trac_query'));
                $this->xml_tpl->setVariable("TITLE_DESC",$filter->getQueryString());
                $this->xml_tpl->parseCurrentBlock();

                #echo htmlentities($this->xml_tpl->get());
        }

Here is the caller graph for this function:

ilPDFPresentation::__addMain (  ) 

Definition at line 156 of file class.ilPDFPresentation.php.

References $ilUser.

Referenced by __createPersonalProgressList().

        {
                global $ilUser;

                $this->xml_tpl->setVariable("LANG",$ilUser->getLanguage());
                $this->xml_tpl->setVariable("PDF_TITLE",$this->lng->txt('learning_progress'));
                $this->xml_tpl->setVariable("PDF_DESCRIPTION",$this->lng->txt('learning_progress'));
                $this->xml_tpl->setVariable("PAGE_TITLE",$this->lng->txt('learning_progress'));
                $this->xml_tpl->setVariable("PAGE_DESCRIPTION",$this->lng->txt('learning_progress'));
                
                return true;
        }

Here is the caller graph for this function:

ilPDFPresentation::__convert (  ) 

Definition at line 170 of file class.ilPDFPresentation.php.

References $xml, and sendInfo().

Referenced by __createPersonalProgressList().

        {
                include_once 'Services/Transformation/classes/class.ilContentObject2FO.php';

                $co2fo = new ilContentObject2FO();
                $co2fo->setXMLString($xml = $this->xml_tpl->get());
                if(!$co2fo->transform())
                {
                        sendInfo($this->lng->txt('trac_error_pdf',true));
                        $this->ctrl->returnToParent($this);
                }

                include_once 'Services/Transformation/classes/class.ilFO2PDF.php';

                $fo2pdf = new ilFO2PDF();
                $fo2pdf->setFOString($co2fo->getFOString());

                #var_dump("<pre>",htmlentities($co2fo->getFOString()),"<pre>");
                $pdf = $fo2pdf->send();
                
                if(is_null($pdf))
                {
                        sendInfo($this->lng->txt('trac_error_pdf',true));
                        $this->ctrl->returnToParent($this);
                }
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilPDFPresentation::__createPersonalProgressList (  ) 

Definition at line 114 of file class.ilPDFPresentation.php.

References __addFilter(), __addMain(), and __convert().

Referenced by createList().

        {
                // Load and fill xml template
                $this->xml_tpl = new ilTemplate('tpl.lp_pdf_list.xml',true,true,'Services/Tracking');

                $this->__addMain();
                $this->__addFilter();

                // Finally convert to fop
                $this->__convert();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilPDFPresentation::__init (  ) 

Definition at line 86 of file class.ilPDFPresentation.php.

References $ilUser.

Referenced by ilPDFPresentation().

        {
                global $ilUser;

                include_once './classes/class.ilXmlWriter.php';
                $this->xmlWriter = new ilXmlWriter();
                

                include_once './Services/Tracking/classes/class.ilLPFilter.php';
                $this->filter = new ilLPFilter($ilUser->getId());


        }

Here is the caller graph for this function:

ilPDFPresentation::createList (  ) 

Definition at line 100 of file class.ilPDFPresentation.php.

References __createPersonalProgressList(), ilLearningProgressBaseGUI::getMode(), getType(), and sendInfo().

        {
                switch($this->getType())
                {
                        case LP_ACTIVE_PROGRESS:
                                return $this->__createPersonalProgressList();

                        default:
                                sendInfo('trac_pdf_error'. ' '.$this->getMode(),true);
                }

                $this->ctrl->returnToParent($this);
        }

Here is the call graph for this function:

& ilPDFPresentation::executeCommand (  ) 

execute command

Definition at line 62 of file class.ilPDFPresentation.php.

References $cmd.

        {
                $this->ctrl->setReturn($this, "");
                switch($this->ctrl->getNextClass())
                {
                        default:
                                $cmd = $this->ctrl->getCmd();
                                $this->$cmd();

                }
                return true;
        }

ilPDFPresentation::getType (  ) 

Definition at line 79 of file class.ilPDFPresentation.php.

Referenced by createList().

        {
                return $this->type;
        }

Here is the caller graph for this function:

ilPDFPresentation::ilPDFPresentation ( a_mode,
a_ref_id,
a_user_id = 0 
)

Definition at line 47 of file class.ilPDFPresentation.php.

References $ilCtrl, ilLearningProgressBaseGUI::$lng, __init(), and ilLearningProgressBaseGUI::ilLearningProgressBaseGUI().

        {
                global $lng,$ilCtrl;

                parent::ilLearningProgressBaseGUI($a_mode,$a_ref_id,$a_user_id);

                $this->ctrl =& $ilCtrl;
                $this->lng =& $lng;

                $this->__init();
        }

Here is the call graph for this function:

ilPDFPresentation::setType ( a_type  ) 

Definition at line 75 of file class.ilPDFPresentation.php.

        {
                $this->type = $a_type;
        }


Field Documentation

ilPDFPresentation::$type = ''

Definition at line 44 of file class.ilPDFPresentation.php.


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