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
00036 include_once 'Services/Tracking/classes/ItemList/class.ilLPObjectItemListGUI.php';
00037
00038 class ilLPEventListGUI extends ilLPObjectItemListGUI
00039 {
00040 var $child_id = null;
00041
00042 function ilLPEventListGUI($a_obj_id)
00043 {
00044 parent::ilLPObjectItemListGUI($a_obj_id,'objective');
00045 }
00046
00047 function hasDetails()
00048 {
00049 return false;
00050 }
00051
00052 function __readMode()
00053 {
00054 include_once 'Services/Tracking/classes/class.ilLPObjSettings.php';
00055 $this->mode = LP_MODE_EVENT;
00056 }
00057
00058 function __readStatusInfo()
00059 {
00060 include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
00061 $this->status_info = ilLPStatusWrapper::_getStatusInfoByType($this->getId(),'event');
00062 }
00063
00064 function __readTypicalLearningTime()
00065 {
00066 $this->tlt = 0;
00067 }
00068
00069 function __readTitle()
00070 {
00071 return $this->title = $this->status_info['title'];
00072 }
00073 function __readDescription()
00074 {
00075 return $this->description = $this->status_info['description'];
00076 }
00077
00078 function renderTypeImage()
00079 {
00080 $this->tpl->setCurrentBlock("row_type_image");
00081 $this->tpl->setVariable("TYPE_IMG",ilUtil::getImagePath('icon_'.'event'.'.gif'));
00082 $this->tpl->setVariable("TYPE_ALT_IMG",$this->lng->txt('event'));
00083 $this->tpl->parseCurrentBlock();
00084 }
00085
00086 function __readMark()
00087 {
00088 include_once './course/classes/Event/class.ilEventParticipants.php';
00089 $this->mark = ilEventParticipants::_lookupMark($this->getId(),$this->getCurrentUser());
00090 }
00091 function __readComment()
00092 {
00093 include_once './course/classes/Event/class.ilEventParticipants.php';
00094 $this->comment = ilEventParticipants::_lookupComment($this->getId(),$this->getCurrentUser());
00095 }
00096
00097 function __readUserStatus()
00098 {
00099 include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
00100 if($this->status_info['starting_time'] < time())
00101 {
00102 if(in_array($this->getCurrentUser(),ilLPStatusWrapper::_getCompletedByType($this->getId(),'event')))
00103 {
00104 return $this->status = LP_STATUS_PARTICIPATED;
00105 }
00106 else
00107 {
00108 return $this->status = LP_STATUS_NOT_PARTICIPATED;
00109 }
00110 }
00111 if(in_array($this->getCurrentUser(),ilLPStatusWrapper::_getCompletedByType($this->getId(),'event')))
00112 {
00113 return $this->status = LP_STATUS_PARTICIPATED;
00114 }
00115 if($this->status_info['registration'])
00116 {
00117 if(in_array($this->getCurrentUser(),ilLPStatusWrapper::_getInProgressByType($this->getId(),'event')))
00118 {
00119 return $this->status = LP_STATUS_REGISTERED;
00120 }
00121 else
00122 {
00123 return $this->status = LP_STATUS_NOT_REGISTERED;
00124 }
00125 }
00126 else
00127 {
00128 return $this->status = LP_STATUS_NOT_ATTEMPTED;
00129 }
00130 }
00131 }
00132 ?>