Class ilObjCourseListGUI. More...
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. |
Class ilObjCourseListGUI.
Definition at line 37 of file class.ilObjCourseListGUI.php.
ilObjCourseListGUI::getProperties | ( | ) |
Get item properties.
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; }
ilObjCourseListGUI::ilObjCourseListGUI | ( | ) |
constructor
Definition at line 43 of file class.ilObjCourseListGUI.php.
References ilObjectListGUI::ilObjectListGUI().
{ $this->ilObjectListGUI(); }
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(); }
ilObjCourseListGUI::initItem | ( | $ | a_ref_id, | |
$ | a_obj_id, | |||
$ | a_title = "" , |
|||
$ | a_description = "" | |||
) |
inititialize new item
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; }