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>
Helmut Schottmüller <helmut.schottmueller@mac.com>
Id:
class.ilObjSurveyListGUI.php 13754 2007-05-01 18:38:31Z hschottm

Definition at line 39 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 91 of file class.ilObjSurveyListGUI.php.

References ilFrameTargetInfo::_getFrame().

        {
                switch($a_cmd)
                {
                        case "":
                        case "infoScreen":
                        case "evaluation":
                                include_once "./classes/class.ilFrameTargetInfo.php";
                                $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 181 of file class.ilObjSurveyListGUI.php.

        {
                $cmd_link = "";
                switch ($a_cmd)
                {
                        default:
                                $cmd_link = "ilias.php?baseClass=ilObjSurveyGUI&amp;ref_id=" . $this->ref_id .
                                        "&amp;cmd=$a_cmd";
                                break;
                }
                // separate method for this line
                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 118 of file class.ilObjSurveyListGUI.php.

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

        {
                global $lng, $ilUser, $rbacsystem;

                $props = array();

                if (!$rbacsystem->checkAccess("participate", $this->ref_id))
                {
                        return $props;
                }

                include_once("./survey/classes/class.ilObjSurveyAccess.php");
                if (!ilObjSurveyAccess::_lookupOnline($this->obj_id))
                {
                        $props[] = array("alert" => true, "property" => $lng->txt("status"),
                                "value" => $lng->txt("offline"));
                }
                else
                {
                        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
                        {
                                if ($ilUser->getId() != ANONYMOUS_USER_ID)
                                {
                                        $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 45 of file class.ilObjSurveyListGUI.php.

References ilObjectListGUI::ilObjectListGUI().

        {
                $this->ilObjectListGUI();
                $this->info_screen_enabled = true;
        }

Here is the call graph for this function:

ilObjSurveyListGUI::init (  ) 

initialisation

Reimplemented from ilObjectListGUI.

Definition at line 54 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('./survey/classes/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 78 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: