12 require_once(
'./Modules/StudyProgramme/classes/class.ilObjStudyProgrammeAdmin.php');
15 protected static $tpl_file =
"tpl.progress_list_item.html";
61 $this->il_lng->loadLanguageModule(
"prg");
64 $this->progress = $a_progress;
67 $this->show_info_mesage =
false;
68 $this->visible_on_pd_mode =
"read";
73 if ($this->
html === null) {
74 $tpl = $this->
getTemplate(
"Modules/StudyProgramme", static::$tpl_file,
true,
true);
83 $programme = $this->progress->getStudyProgramme();
86 if ($title_and_icon_target) {
87 $tpl->setCurrentBlock(
"linked_icon");
89 $tpl->setVariable(
"ALT_ICON", $this->
getAltIcon($programme->getId()));
90 $tpl->setVariable(
"ICON_HREF", $title_and_icon_target);
91 $tpl->parseCurrentBlock();
93 $tpl->setCurrentBlock(
"linked_title");
95 $tpl->setVariable(
"HREF_TITLE", $title_and_icon_target);
96 $tpl->parseCurrentBlock();
98 $tpl->setCurrentBlock(
"not_linked_icon");
100 $tpl->setVariable(
"ALT_ICON", $this->
getAltIcon($programme->getId()));
101 $tpl->parseCurrentBlock();
103 $tpl->setCurrentBlock(
"not_linked_title");
105 $tpl->parseCurrentBlock();
108 if ($this->show_info_mesage) {
110 $tpl->setVariable(
"MORE_OBJECTS", $this->il_lng->txt(
"prg_more_objects_without_read_permission"));
113 $tpl->setVariable(
"TXT_DESC", $programme->getDescription());
122 protected function getTemplate($a_component, $a_file, $a_remove_unknown_vars, $a_remove_empty_blocks)
124 return new ilTemplate($a_file, $a_remove_unknown_vars, $a_remove_empty_blocks, $a_component);
134 return $this->il_lng->txt(
"icon") .
" " . $this->il_lng->txt(
"obj_prg");
139 $this->il_ctrl->setParameterByClass(
"ilPersonalDesktopGUI",
"prg_progress_id", $a_progress->
getId());
140 $this->il_ctrl->setParameterByClass(
"ilPersonalDesktopGUI",
"expand", 1);
141 $link = $this->il_ctrl->getLinkTargetByClass(
"ilPersonalDesktopGUI",
"jumpToSelectedItems");
142 $this->il_ctrl->setParameterByClass(
"ilPersonalDesktopGUI",
"prg_progress_id", null);
143 $this->il_ctrl->setParameterByClass(
"ilPersonalDesktopGUI",
"expand", null);
149 $tooltip_id =
"prg_" . $a_progress->
getId();
155 if ($maximum_possible_amount_of_points > 0) {
156 $current_percent = (int) ($current_amount_of_points * 100 / $maximum_possible_amount_of_points);
157 $required_percent = (int) ($required_amount_of_points * 100 / $maximum_possible_amount_of_points);
160 $current_percent = 100;
161 $required_percent = 100;
163 $current_percent = 0;
164 $required_percent = 0;
169 if ($required_percent == 0) {
170 $required_percent = 0.1;
177 $css_class = self::SUCCESSFUL_PROGRESS_CSS_CLASS;
179 $css_class = self::NON_SUCCESSFUL_PROGRESS_CSS_CLASS;
182 require_once(
"Services/Container/classes/class.ilContainerObjectiveGUI.php");
189 $this->il_lng->txt(
"prg_progress_info"),
197 $lang_val =
"prg_progress_status";
201 if ($study_programm->hasChildren() && !$study_programm->hasLPChildren()) {
202 $lang_val =
"prg_progress_status_with_child_sp";
209 $this->il_lng->txt($lang_val),
232 $children = $programme->getChildren();
233 foreach ($children as
$key => $child) {
234 $read = $this->il_access->checkAccess(
"read",
"", $child->getRefId(),
"prg", $child->getId());
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
buildProgressStatus(ilStudyProgrammeUserProgress $a_progress)
const SETTING_VISIBLE_ON_PD_ALLWAYS
getCurrentAmountOfPoints()
Get the amount of points the user currently achieved.
setShowInfoMessage($show_info_mesage)
buildProgressBar(ilStudyProgrammeUserProgress $a_progress)
getStudyProgramme()
Get the program node where this progress belongs to was made.
isSuccessful()
Check whether the user was successful on this node.
getTitleForItem(ilObjStudyProgramme $a_programme)
const SUCCESSFUL_PROGRESS_CSS_CLASS
getId()
Get the id of the progress.
setVisibleOnPDMode($visible_on_pd_mode)
__construct(ilStudyProgrammeUserProgress $a_progress)
const NON_SUCCESSFUL_PROGRESS_CSS_CLASS
getTitleAndIconTarget(ilStudyProgrammeUserProgress $a_progress)
Class ilObjStudyProgramme.
special template class to simplify handling of ITX/PEAR
getTitle()
get object title public
getAmountOfPoints()
Get the amount of points needed to complete the node.
buildToolTip(ilStudyProgrammeUserProgress $a_progress)
setOnlyRelevant($only_relevant)
getMaximumPossibleAmountOfPoints($only_relevant=false)
Get the maximum possible amount of points a user can achieve for the completion of this node...
Class ilStudyProgrammeProgressListGUI.
getTemplate($a_component, $a_file, $a_remove_unknown_vars, $a_remove_empty_blocks)
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)
showMoreObjectsInfo($programme)
Represents the progress of a user at one node of a study programme.