Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00035 include_once "classes/class.ilObjectListGUI.php";
00036
00037 class ilObjCourseListGUI extends ilObjectListGUI
00038 {
00043 function ilObjCourseListGUI()
00044 {
00045 $this->ilObjectListGUI();
00046 }
00047
00051 function init()
00052 {
00053 $this->delete_enabled = true;
00054 $this->cut_enabled = true;
00055 $this->subscribe_enabled = true;
00056 $this->link_enabled = false;
00057 $this->payment_enabled = true;
00058 $this->info_screen_enabled = true;
00059 $this->type = "crs";
00060 $this->gui_class_name = "ilobjcoursegui";
00061
00062
00063 include_once('class.ilObjCourseAccess.php');
00064 $this->commands = ilObjCourseAccess::_getCommands();
00065 }
00066
00075 function initItem($a_ref_id, $a_obj_id, $a_title = "", $a_description = "")
00076 {
00077 global $ilBench;
00078
00079 parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
00080
00081
00082
00083
00084 $ilBench->start("ilObjCourseListGUI", "1000_checkAllConditions");
00085 $this->conditions_ok = ilConditionHandler::_checkAllConditionsOfTarget($this->obj_id);
00086 $ilBench->stop("ilObjCourseListGUI", "1000_checkAllConditions");
00087
00088 $ilBench->start("ilObjCourseListGUI", "2000_getInstance");
00089 #$this->course_obj =& ilObjectFactory::getInstanceByRefId($this->ref_id);
00090 $ilBench->stop("ilObjCourseListGUI", "2000_getInstance");
00091
00092 $ilBench->start("ilObjCourseListGUI", "3000_initCourseMemberObject");
00093 #$this->course_obj->initCourseMemberObject();
00094 $ilBench->stop("ilObjCourseListGUI", "3000_initCourseMemberObject");
00095
00096 }
00097
00098
00107 function getProperties()
00108 {
00109 global $lng, $ilUser;
00110
00111 $props = array();
00112
00113
00114 include_once 'course/classes/class.ilObjCourse.php';
00115 if(!ilObjCourse::_isActivated($this->obj_id))
00116 {
00117 $props[] = array("alert" => true, "property" => $lng->txt("status"),
00118 "value" => $lng->txt("offline"));
00119 }
00120
00121
00122 include_once 'course/classes/class.ilCourseMembers.php';
00123 if(ilCourseMembers::_isBlocked($this->obj_id,$ilUser->getId()))
00124 {
00125 $props[] = array("alert" => true, "property" => $lng->txt("member_status"),
00126 "value" => $lng->txt("crs_status_blocked"));
00127 }
00128
00129
00130 if (ilCourseMembers::_isSubscriber($this->obj_id,$ilUser->getId()))
00131 {
00132 $props[] = array("alert" => true, "property" => $lng->txt("member_status"),
00133 "value" => $lng->txt("crs_status_pending"));
00134 }
00135
00136 return $props;
00137 }
00138 }
00139 ?>