Public Member Functions

ilObjCourseListGUI Class Reference

Class ilObjCourseListGUI. More...

Inheritance diagram for ilObjCourseListGUI:
Collaboration diagram for ilObjCourseListGUI:

Public Member Functions

 ilObjCourseListGUI ()
 constructor
 init ()
 initialisation
 initItem ($a_ref_id, $a_obj_id, $a_title="", $a_description="")
 inititialize new item
 getProperties ()
 Get item properties.

Detailed Description

Class ilObjCourseListGUI.

Author:
Alex Killing <alex.killing@gmx.de>
Id:
class.ilObjCourseListGUI.php 11209 2006-06-23 08:17:35Z smeyer

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


Member Function Documentation

ilObjCourseListGUI::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 107 of file class.ilObjCourseListGUI.php.

References $lng, ilObjCourse::_isActivated(), ilCourseMembers::_isBlocked(), and ilCourseMembers::_isSubscriber().

        {
                global $lng, $ilUser;

                $props = array();

                // offline
                include_once 'course/classes/class.ilObjCourse.php';
                if(!ilObjCourse::_isActivated($this->obj_id))
                {
                        $props[] = array("alert" => true, "property" => $lng->txt("status"),
                                "value" => $lng->txt("offline"));
                }

                // blocked
                include_once 'course/classes/class.ilCourseMembers.php';
                if(ilCourseMembers::_isBlocked($this->obj_id,$ilUser->getId()))
                {
                        $props[] = array("alert" => true, "property" => $lng->txt("member_status"),
                                "value" => $lng->txt("crs_status_blocked"));
                }

                // pending subscription
                if (ilCourseMembers::_isSubscriber($this->obj_id,$ilUser->getId()))
                {
                        $props[] = array("alert" => true, "property" => $lng->txt("member_status"),
                                "value" => $lng->txt("crs_status_pending"));
                }

                return $props;
        }

Here is the call graph for this function:

ilObjCourseListGUI::ilObjCourseListGUI (  ) 

constructor

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

References ilObjectListGUI::ilObjectListGUI().

        {
                $this->ilObjectListGUI();
        }

Here is the call graph for this function:

ilObjCourseListGUI::init (  ) 

initialisation

Reimplemented from ilObjectListGUI.

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

References ilObjCourseAccess::_getCommands().

        {
                $this->delete_enabled = true;
                $this->cut_enabled = true;
                $this->subscribe_enabled = true;
                $this->link_enabled = false;
                $this->payment_enabled = true;
                $this->info_screen_enabled = true;
                $this->type = "crs";
                $this->gui_class_name = "ilobjcoursegui";

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

Here is the call graph for this function:

ilObjCourseListGUI::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.ilObjCourseListGUI.php.

References $ilBench, and ilConditionHandler::_checkAllConditionsOfTarget().

        {
                global $ilBench;

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

                // to do: get rid of all this...

//echo "A-".memory_get_usage();echo "-".$full_class;
                $ilBench->start("ilObjCourseListGUI", "1000_checkAllConditions");
                $this->conditions_ok = ilConditionHandler::_checkAllConditionsOfTarget($this->obj_id);
                $ilBench->stop("ilObjCourseListGUI", "1000_checkAllConditions");
//echo "B-".memory_get_usage();echo "-".$full_class;
                $ilBench->start("ilObjCourseListGUI", "2000_getInstance");
                #$this->course_obj =& ilObjectFactory::getInstanceByRefId($this->ref_id);
                $ilBench->stop("ilObjCourseListGUI", "2000_getInstance");
//echo "C-".memory_get_usage();echo "-".$full_class;
                $ilBench->start("ilObjCourseListGUI", "3000_initCourseMemberObject");
                #$this->course_obj->initCourseMemberObject();
                $ilBench->stop("ilObjCourseListGUI", "3000_initCourseMemberObject");
//echo "D-".memory_get_usage();echo "-".$full_class;
        }

Here is the call graph for this function:


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