Inheritance diagram for ilLPObjectItemListGUI:
Collaboration diagram for ilLPObjectItemListGUI:Public Member Functions | |
| ilLPObjectItemListGUI ($a_id, $a_type) | |
| addReferences ($a_references) | |
| __readTitle () | |
| __readDescription () | |
| __readStatusInfo () | |
| __readMark () | |
| __readComment () | |
| __readTypicalLearningTime () | |
| __readUserStatus () | |
| __readUserStatusInfo () | |
| renderPath ($a_force_details=true) | |
Data Fields | |
| $references = array() | |
Definition at line 38 of file class.ilLPObjectItemListGUI.php.
| ilLPObjectItemListGUI::__readComment | ( | ) |
Reimplemented in ilLPEventListGUI, ilLPObjectiveItemListGUI, and ilLPSAHSItemListGUI.
Definition at line 77 of file class.ilLPObjectItemListGUI.php.
References ilLPMarks::_lookupComment(), ilLPItemListGUI::getCurrentUser(), and ilLPItemListGUI::getId().
{
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
$this->comment = ilLPMarks::_lookupComment($this->getCurrentUser(),$this->getId());
}
Here is the call graph for this function:| ilLPObjectItemListGUI::__readDescription | ( | ) |
Reimplemented in ilLPEventListGUI, ilLPObjectiveItemListGUI, ilLPSAHSItemListGUI, and ilLPUserItemListGUI.
Definition at line 60 of file class.ilLPObjectItemListGUI.php.
References ilLPItemListGUI::getId().
{
global $ilObjDataCache;
$this->description = $ilObjDataCache->lookupDescription($this->getId());
}
Here is the call graph for this function:| ilLPObjectItemListGUI::__readMark | ( | ) |
Reimplemented in ilLPEventListGUI, ilLPObjectiveItemListGUI, and ilLPSAHSItemListGUI.
Definition at line 71 of file class.ilLPObjectItemListGUI.php.
References ilLPMarks::_lookupMark(), ilLPItemListGUI::getCurrentUser(), and ilLPItemListGUI::getId().
{
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
$this->mark = ilLPMarks::_lookupMark($this->getCurrentUser(),$this->getId());
}
Here is the call graph for this function:| ilLPObjectItemListGUI::__readStatusInfo | ( | ) |
Reimplemented from ilLPItemListGUI.
Reimplemented in ilLPEventListGUI.
Definition at line 65 of file class.ilLPObjectItemListGUI.php.
References ilLPStatusWrapper::_getStatusInfo(), and ilLPItemListGUI::getId().
{
include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
$this->status_info = ilLPStatusWrapper::_getStatusInfo($this->getId());
}
Here is the call graph for this function:| ilLPObjectItemListGUI::__readTitle | ( | ) |
Reimplemented in ilLPEventListGUI, ilLPObjectiveItemListGUI, ilLPSAHSItemListGUI, and ilLPUserItemListGUI.
Definition at line 55 of file class.ilLPObjectItemListGUI.php.
References ilLPItemListGUI::getId().
{
global $ilObjDataCache;
$this->title = $ilObjDataCache->lookupTitle($this->getId());
}
Here is the call graph for this function:| ilLPObjectItemListGUI::__readTypicalLearningTime | ( | ) |
Reimplemented from ilLPItemListGUI.
Reimplemented in ilLPEventListGUI.
Definition at line 83 of file class.ilLPObjectItemListGUI.php.
References ilLPStatusWrapper::_getTypicalLearningTime(), and ilLPItemListGUI::getId().
{
include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
$this->tlt = ilLPStatusWrapper::_getTypicalLearningTime($this->getId());
}
Here is the call graph for this function:| ilLPObjectItemListGUI::__readUserStatus | ( | ) |
Reimplemented from ilLPItemListGUI.
Reimplemented in ilLPEventListGUI, ilLPObjectiveItemListGUI, and ilLPSAHSItemListGUI.
Definition at line 89 of file class.ilLPObjectItemListGUI.php.
References ilLPStatusWrapper::_getCompleted(), ilLPStatusWrapper::_getFailed(), ilLPStatusWrapper::_getInProgress(), ilLPItemListGUI::getCurrentUser(), and ilLPItemListGUI::getId().
{
include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
if(in_array($this->getCurrentUser(),ilLPStatusWrapper::_getInProgress($this->getId())))
{
$this->status = LP_STATUS_IN_PROGRESS;
}
elseif(in_array($this->getCurrentUser(),ilLPStatusWrapper::_getCompleted($this->getId())))
{
$this->status = LP_STATUS_COMPLETED;
}
elseif(in_array($this->getCurrentUser(),ilLPStatusWrapper::_getFailed($this->getId())))
{
$this->status = LP_STATUS_FAILED;
}
else
{
$this->status = LP_STATUS_NOT_ATTEMPTED;
}
}
Here is the call graph for this function:| ilLPObjectItemListGUI::__readUserStatusInfo | ( | ) |
Reimplemented in ilLPObjectiveItemListGUI, and ilLPSAHSItemListGUI.
Definition at line 111 of file class.ilLPObjectItemListGUI.php.
References $res, ilLPItemListGUI::__getPercent(), ilLPStatusWrapper::_getCompleted(), ilLearningProgress::_getProgress(), ilLPStatusWrapper::_getTypicalLearningTime(), ilLPItemListGUI::getCurrentUser(), ilLPItemListGUI::getId(), and ilLPItemListGUI::getMode().
{
global $ilObjDataCache;
$this->user_status_info = null;
switch($this->getMode())
{
case LP_MODE_TEST_PASSED:
// Get stored test results
$found = false;
foreach($this->status_info['results'] as $res)
{
if($this->getCurrentUser() == $res['user_id'])
{
$this->user_status_info = array($this->lng->txt('trac_reached_points'),
$this->__getPercent($res['max_points'],$res['reached_points']));
return true;
}
}
return $this->user_status_info = array($this->lng->txt('trac_reached_points'),
"0.00%");
case LP_MODE_TLT:
if(!$this->status_info['tlt'])
{
return false;
}
include_once './Services/Tracking/classes/class.ilLearningProgress.php';
$user_data = ilLearningProgress::_getProgress($this->getCurrentUser(),$this->getId());
return $this->user_status_info = array($this->lng->txt('trac_edit_time'),
$this->__getPercent($this->status_info['tlt'],$user_data['spent_time']));
case LP_MODE_VISITS:
if(!$this->status_info['visits'])
{
return false;
}
include_once './Services/Tracking/classes/class.ilLearningProgress.php';
$user_data = ilLearningProgress::_getProgress($this->getCurrentUser(),$this->getId());
return $this->user_status_info = array($this->lng->txt('trac_reached_visits'),
$this->__getPercent($this->status_info['visits'],$user_data['visits']));
case LP_MODE_OBJECTIVES:
if(!$this->status_info['num_objectives'])
{
return false;
}
$fullfilled = $this->status_info['objective_result'][$this->getCurrentUser()] ?
$this->status_info['objective_result'][$this->getCurrentUser()] : array();
return $this->user_status_info = array($this->lng->txt('trac_reached_objectives'),
$this->__getPercent($this->status_info['num_objectives'],
count($fullfilled)));
case LP_MODE_SCORM:
if(!$this->status_info['num_scos'])
{
return false;
}
return $this->user_status_info = array($this->lng->txt('trac_edited_scos'),
$this->__getPercent($this->status_info['num_scos'],
$this->status_info['num_completed'][$this->getCurrentUser()]));
case LP_MODE_COLLECTION:
include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
$user_time = 0;
if(!is_array($this->status_info['collections']) or !$this->tlt)
{
return false;
}
foreach($this->status_info['collections'] as $item)
{
$object_id = $ilObjDataCache->lookupObjId($item);
// count full time if status is completed
if(in_array($this->getCurrentUser(),ilLPStatusWrapper::_getCompleted($object_id)))
{
$user_time += ilLPStatusWrapper::_getTypicalLearningTime($object_id);
continue;
}
switch($ilObjDataCache->lookupType($object_id))
{
case 'lm':
$progress = ilLearningProgress::_getProgress($this->getCurrentUser(),$object_id);
$user_time += min($progress['spent_time'],
ilLPStatusWrapper::_getTypicalLearningTime($object_id));
break;
}
}
if($user_time)
{
$this->user_status_info = array($this->lng->txt('trac_processing_time'),
$this->__getPercent($this->tlt,$user_time));
}
break;
}
}
Here is the call graph for this function:| ilLPObjectItemListGUI::addReferences | ( | $ | a_references | ) |
Definition at line 48 of file class.ilLPObjectItemListGUI.php.
{
$this->references = $a_references;
}
| ilLPObjectItemListGUI::ilLPObjectItemListGUI | ( | $ | a_id, | |
| $ | a_type | |||
| ) |
Definition at line 43 of file class.ilLPObjectItemListGUI.php.
References ilLPItemListGUI::ilLPItemListGUI().
Referenced by ilLPContentObjectListGUI::ilLPContentObjectListGUI(), ilLPCourseListGUI::ilLPCourseListGUI(), ilLPEventListGUI::ilLPEventListGUI(), ilLPExerciseListGUI::ilLPExerciseListGUI(), ilLPFileBasedLMListGUI::ilLPFileBasedLMListGUI(), ilLPFolderListGUI::ilLPFolderListGUI(), ilLPGroupListGUI::ilLPGroupListGUI(), ilLPObjectiveItemListGUI::ilLPObjectiveItemListGUI(), ilLPSAHSItemListGUI::ilLPSAHSItemListGUI(), ilLPSAHSListGUI::ilLPSAHSListGUI(), ilLPTestListGUI::ilLPTestListGUI(), and ilLPUserItemListGUI::ilLPUserItemListGUI().
{
parent::ilLPItemListGUI($a_id,$a_type);
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLPObjectItemListGUI::renderPath | ( | $ | a_force_details = true |
) |
Definition at line 215 of file class.ilLPObjectItemListGUI.php.
References $data, $ref_id, ilObjUserTracking::_enabledUserRelatedData(), ilLink::_getLink(), ilLPItemListGUI::getCmdClass(), and ilLPItemListGUI::isAnonymized().
{
include_once 'Services/Tracking/classes/class.ilObjUserTracking.php';
include_once 'classes/class.ilLink.php';
if(!count($this->references))
{
return true;
}
foreach($this->references as $ref_id)
{
$path = '...';
$counter = 0;
$path_full = $this->tree->getPathFull($ref_id);
foreach($path_full as $data)
{
if(++$counter < (count($path_full)-1))
{
continue;
}
$path .= " -> ";
if($ref_id != $data['ref_id'])
{
$path .= $data['title'];
}
else
{
$path .= ('<a target="_top" href="'.
ilLink::_getLink($data['ref_id'],$data['type']).'">'.
$data['title'].'</a>');
}
}
$this->tpl->setCurrentBlock("path_item");
#var_dump("<pre>",$a_force_details,ilObjUserTracking::_enabledUserRelatedData(),!$this->isAnonymized(),"<pre>");
if($a_force_details or (ilObjUserTracking::_enabledUserRelatedData() and !$this->isAnonymized()))
{
$this->ctrl->setParameterByClass($this->getCmdClass(),'details_id',$ref_id);
$this->tpl->setVariable("PATH_DETAILS",$this->ctrl->getLinkTargetByClass($this->getCmdClass(),'details'));
$this->tpl->setVariable("TXT_PATH_DETAILS",$this->lng->txt('details'));
}
$this->tpl->setVariable("OCCURRENCES",$this->lng->txt('trac_occurrences'));
$this->tpl->setVariable("PATH_ITEM",$path);
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("path");
$this->tpl->parseCurrentBlock();
}
return true;
}
Here is the call graph for this function:| ilLPObjectItemListGUI::$references = array() |
Definition at line 40 of file class.ilLPObjectItemListGUI.php.
1.7.1