12require_once(
'./Modules/StudyProgramme/classes/class.ilObjStudyProgrammeAdmin.php');
 
   14        protected static $tpl_file = 
"tpl.progress_list_item.html";
 
   59                $this->il_lng->loadLanguageModule(
"prg");
 
   62                $this->progress = $a_progress;
 
   65                $this->show_info_mesage = 
false;
 
   66                $this->visible_on_pd_mode = 
"read";
 
   70                if ($this->html === 
null) {
 
   71                        $tpl = $this->
getTemplate(
"Modules/StudyProgramme", static::$tpl_file, 
true, 
true);
 
   73                        $this->html = 
$tpl->get();
 
   79                $programme = $this->progress->getStudyProgramme();
 
   82                if ($title_and_icon_target) {
 
   83                        $tpl->setCurrentBlock(
"linked_icon");
 
   85                        $tpl->setVariable(
"ALT_ICON", $this->
getAltIcon($programme->getId()));
 
   86                        $tpl->setVariable(
"ICON_HREF", $title_and_icon_target);
 
   87                        $tpl->parseCurrentBlock();
 
   89                        $tpl->setCurrentBlock(
"linked_title");
 
   91                        $tpl->setVariable(
"HREF_TITLE", $title_and_icon_target);
 
   92                        $tpl->parseCurrentBlock();
 
   95                        $tpl->setCurrentBlock(
"not_linked_icon");
 
   97                        $tpl->setVariable(
"ALT_ICON", $this->
getAltIcon($programme->getId()));
 
   98                        $tpl->parseCurrentBlock();
 
  100                        $tpl->setCurrentBlock(
"not_linked_title");
 
  102                        $tpl->parseCurrentBlock();
 
  105                if($this->show_info_mesage) {
 
  107                                $tpl->setVariable(
"MORE_OBJECTS",$this->il_lng->txt(
"prg_more_objects_without_read_permission"));
 
  110                $tpl->setVariable(
"TXT_DESC", $programme->getDescription());
 
  118        protected function getTemplate($a_component, $a_file, $a_remove_unknown_vars, $a_remove_empty_blocks) {
 
  119                return new ilTemplate($a_file, $a_remove_unknown_vars, $a_remove_empty_blocks, $a_component);
 
  127                return $this->il_lng->txt(
"icon").
" ".$this->il_lng->txt(
"obj_prg");
 
  131                $this->il_ctrl->setParameterByClass(
"ilPersonalDesktopGUI", 
"prg_progress_id", $a_progress->
getId());
 
  132                $this->il_ctrl->setParameterByClass(
"ilPersonalDesktopGUI", 
"expand", 1);
 
  133                $link = $this->il_ctrl->getLinkTargetByClass(
"ilPersonalDesktopGUI", 
"jumpToSelectedItems");
 
  134                $this->il_ctrl->setParameterByClass(
"ilPersonalDesktopGUI", 
"prg_progress_id", 
null);
 
  135                $this->il_ctrl->setParameterByClass(
"ilPersonalDesktopGUI", 
"expand", 
null);
 
  140                $tooltip_id = 
"prg_".$a_progress->getId();
 
  146                if ($maximum_possible_amount_of_points > 0) {
 
  147                        $current_percent = (int)($current_amount_of_points * 100 / $maximum_possible_amount_of_points);
 
  148                        $required_percent = (int)($required_amount_of_points * 100 / $maximum_possible_amount_of_points);
 
  152                                $current_percent = 100;
 
  153                                $required_percent = 100;
 
  156                                $current_percent = 0;
 
  157                                $required_percent = 0;
 
  162                if($required_percent == 0) {
 
  163                        $required_percent = 0.1;
 
  176                require_once(
"Services/Container/classes/class.ilContainerObjectiveGUI.php");
 
  178                                                                                                                 , $progress_status, 
null, $tooltip_id, $tooltip_txt);
 
  182                return sprintf( $this->il_lng->txt(
"prg_progress_info")
 
  189                $lang_val = 
"prg_progress_status";
 
  193                if($study_programm->hasChildren() && !$study_programm->hasLPChildren()) {
 
  194                        $lang_val = 
"prg_progress_status_with_child_sp";
 
  200                return sprintf( $this->il_lng->txt($lang_val)
 
  219                $children = $programme->getChildren();
 
  220                foreach ($children as $key => $child) {
 
  221                        $read = $this->il_access->checkAccess(
"read", 
"", $child->getRefId(), 
"prg", $child->getId());
 
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
static renderProgressBar($a_perc_result=null, $a_perc_limit=null, $a_css=null, $a_caption=null, $a_url=null, $a_tt_id=null, $a_tt_txt=null, $a_next_step=null, $a_sub=false, $a_sub_style=30)
Render progress bar(s)
const SETTING_VISIBLE_ON_PD_ALLWAYS
Class ilObjStudyProgramme.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
getTitle()
get object title @access public
Class ilStudyProgrammeProgressListGUI.
buildProgressBar(ilStudyProgrammeUserProgress $a_progress)
setShowInfoMessage($show_info_mesage)
const SUCCESSFUL_PROGRESS_CSS_CLASS
const NON_SUCCESSFUL_PROGRESS_CSS_CLASS
buildToolTip(ilStudyProgrammeUserProgress $a_progress)
getTemplate($a_component, $a_file, $a_remove_unknown_vars, $a_remove_empty_blocks)
getTitleAndIconTarget(ilStudyProgrammeUserProgress $a_progress)
buildProgressStatus(ilStudyProgrammeUserProgress $a_progress)
__construct(ilStudyProgrammeUserProgress $a_progress)
showMoreObjectsInfo($programme)
setVisibleOnPDMode($visible_on_pd_mode)
setOnlyRelevant($only_relevant)
getTitleForItem(ilObjStudyProgramme $a_programme)
Represents the progress of a user at one node of a study programme.
getMaximumPossibleAmountOfPoints($only_relevant=false)
Get the maximum possible amount of points a user can achieve for the completion of this node.
getId()
Get the id of the progress.
isSuccessful()
Check whether the user was successful on this node.
getCurrentAmountOfPoints()
Get the amount of points the user currently achieved.
getAmountOfPoints()
Get the amount of points needed to complete the node.
getStudyProgramme()
Get the program node where this progress belongs to was made.
special template class to simplify handling of ITX/PEAR