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. | |
Class ilObjCourseListGUI.
Definition at line 37 of file class.ilObjCourseListGUI.php.
| ilObjCourseListGUI::getProperties | ( | ) |
Get item properties.
Definition at line 115 of file class.ilObjCourseListGUI.php.
References $lng, ilCourseParticipants::_getInstanceByObjId(), ilObjCourse::_isActivated(), and ilCourseParticipants::_isSubscriber().
{
global $lng, $ilUser;
$props = array();
// offline
include_once 'Modules/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 'Modules/Course/classes/class.ilCourseParticipants.php';
$members = ilCourseParticipants::_getInstanceByObjId($this->obj_id);
if($members->isBlocked($ilUser->getId()) and $members->isAssigned($ilUser->getId()))
{
$props[] = array("alert" => true, "property" => $lng->txt("member_status"),
"value" => $lng->txt("crs_status_blocked"));
}
// pending subscription
if (ilCourseParticipants::_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(), and ilAdvancedMDSubstitution::_getInstanceByObjectType().
{
$this->static_link_enabled = true;
$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";
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDSubstitution.php');
$this->substitutions = ilAdvancedMDSubstitution::_getInstanceByObjectType($this->type);
if($this->substitutions->isActive())
{
$this->substitutions_enabled = true;
}
// 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
| 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 83 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($a_ref_id,$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:
1.7.1