Public Member Functions

ilObjSurveyListGUI Class Reference

Class ilObjSurveyListGUI. More...

Inheritance diagram for ilObjSurveyListGUI:
Collaboration diagram for ilObjSurveyListGUI:

Public Member Functions

 ilObjSurveyListGUI ()
 constructor
 init ()
 initialisation
 initItem ($a_ref_id, $a_obj_id, $a_title="", $a_description="")
 inititialize new item
 getCommandFrame ($a_cmd)
 Get command target frame.
 getProperties ()
 Get item properties.
 getCommandLink ($a_cmd)
 Get command link url.

Detailed Description

Class ilObjSurveyListGUI.

Author:
Alex Killing <alex.killing@gmx.de>
Id:
class.ilObjSurveyListGUI.php 7874 2005-06-16 10:39:41Z shofmann

Definition at line 37 of file class.ilObjSurveyListGUI.php.


Member Function Documentation

ilObjSurveyListGUI::getCommandFrame ( a_cmd  ) 

Get command target frame.

Parameters:
string $a_cmd command
Returns:
string command target frame

Reimplemented from ilObjectListGUI.

Definition at line 88 of file class.ilObjSurveyListGUI.php.

References ilFrameTargetInfo::_getFrame().

        {
                switch($a_cmd)
                {
                        case "":
                        case "run":
                        case "evaluation":
                                $frame = ilFrameTargetInfo::_getFrame("MainContent");
                                break;

                        default:
                }

                return $frame;
        }

Here is the call graph for this function:

ilObjSurveyListGUI::getCommandLink ( a_cmd  ) 

Get command link url.

Parameters:
int $a_ref_id reference id
string $a_cmd command

Reimplemented from ilObjectListGUI.

Definition at line 161 of file class.ilObjSurveyListGUI.php.

        {
                // separate method for this line
                $cmd_link = "survey/survey.php?ref_id=".$this->ref_id."&cmd=$a_cmd";

                return $cmd_link;
        }

ilObjSurveyListGUI::getProperties (  ) 

Get item properties.

Returns:
array array of property arrays: "alert" (boolean) => display as an alert property (usually in red) "property" (string) => property name "value" (string) => property value

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

References $ilUser, $lng, ilObjSurveyAccess::_lookupCreationComplete(), and ilObjSurveyAccess::_lookupFinished().

        {
                global $lng, $ilUser;

                $props = array();

                include_once("survey/classes/class.ilObjSurveyAccess.php");
                if (!ilObjSurveyAccess::_lookupCreationComplete($this->obj_id))
                {
                        // no completion
                        $props[] = array("alert" => true, "property" => $lng->txt("status"),
                                "value" => $lng->txt("svy_warning_survey_not_complete"));
                }
                else
                {
                        $finished = ilObjSurveyAccess::_lookupFinished($this->obj_id, $ilUser->id);

                        // finished
                        if ($finished === 1)
                        {
                                $stat = $this->lng->txt("svy_finished");
                        }
                        // not finished
                        else if ($finished === 0)
                        {
                                $stat = $this->lng->txt("svy_not_finished");
                        }
                        // not started
                        else
                        {
                                $stat = $this->lng->txt("svy_not_started");
                        }
                        $props[] = array("alert" => false, "property" => $lng->txt("status"),
                                "value" => $stat);
                }

                return $props;
        }

Here is the call graph for this function:

ilObjSurveyListGUI::ilObjSurveyListGUI (  ) 

constructor

Definition at line 43 of file class.ilObjSurveyListGUI.php.

References ilObjectListGUI::ilObjectListGUI().

        {
                $this->ilObjectListGUI();
        }

Here is the call graph for this function:

ilObjSurveyListGUI::init (  ) 

initialisation

Reimplemented from ilObjectListGUI.

Definition at line 51 of file class.ilObjSurveyListGUI.php.

References ilObjSurveyAccess::_getCommands().

        {
                $this->delete_enabled = true;
                $this->cut_enabled = true;
                $this->subscribe_enabled = true;
                $this->link_enabled = true;
                $this->payment_enabled = false;
                $this->type = "svy";
                $this->gui_class_name = "ilobjsurveygui";

                // general commands array
                include_once('class.ilObjSurveyAccess.php');
                $this->commands = ilObjSurveyAccess::_getCommands();
        }

Here is the call graph for this function:

ilObjSurveyListGUI::initItem ( a_ref_id,
a_obj_id,
a_title = "",
a_description = "" 
)

inititialize new item

Parameters:
int $a_ref_id reference id
int $a_obj_id object id
string $a_title title
string $a_description description

Reimplemented from ilObjectListGUI.

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

        {
                parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
        }


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