12require_once(
'./Modules/StudyProgramme/classes/class.ilObjStudyProgrammeAdmin.php');
15 protected static $tpl_file =
"tpl.progress_list_item.html";
59 $ilCtrl =
$DIC[
'ilCtrl'];
61 $this->il_lng->loadLanguageModule(
"prg");
62 $this->il_ctrl = $ilCtrl;
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);
76 $this->html =
$tpl->get();
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(
"ilDashboardGUI",
"prg_progress_id", $a_progress->
getId());
140 $this->il_ctrl->setParameterByClass(
"ilDashboardGUI",
"expand", 1);
141 $link = $this->il_ctrl->getLinkTargetByClass(
"ilDashboardGUI",
"jumpToSelectedItems");
142 $this->il_ctrl->setParameterByClass(
"ilDashboardGUI",
"prg_progress_id",
null);
143 $this->il_ctrl->setParameterByClass(
"ilDashboardGUI",
"expand",
null);
149 $tooltip_id =
"prg_" . $a_progress->
getId();
153 $maximum_possible_amount_of_points = $programme->getPossiblePointsOfRelevantChildren($a_progress,
true);
157 if ($maximum_possible_amount_of_points > 0) {
158 $current_percent = (int) ($current_amount_of_points * 100 / $maximum_possible_amount_of_points);
159 $required_percent = (int) ($required_amount_of_points * 100 / $maximum_possible_amount_of_points);
162 $current_percent = 100;
163 $required_percent = 100;
165 $current_percent = 0;
166 $required_percent = 0;
171 if ($required_percent == 0) {
172 $required_percent = 0.1;
184 require_once(
"Services/Container/classes/class.ilContainerObjectiveGUI.php");
191 $this->il_lng->txt(
"prg_progress_info"),
199 $lang_val =
"prg_progress_status";
203 if ($programme->hasChildren() && !$programme->hasLPChildren()) {
204 $lang_val =
"prg_progress_status_with_child_sp";
207 if ($programme->hasChildren()) {
208 $max_points = $programme->getPossiblePointsOfRelevantChildren($a_progress, $this->only_relevant);
212 $this->il_lng->txt($lang_val),
235 $children = $programme->getChildren();
236 foreach ($children as $key => $child) {
237 $read = $this->il_access->checkAccess(
"read",
"", $child->getRefId(),
"prg", $child->getId());
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
static getInstanceByObjId($obj_id)
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.
setShowInfoMessage($show_info_mesage)
const SUCCESSFUL_PROGRESS_CSS_CLASS
buildToolTip(ilStudyProgrammeProgress $a_progress)
const NON_SUCCESSFUL_PROGRESS_CSS_CLASS
buildProgressStatus(ilStudyProgrammeProgress $a_progress)
getTitleAndIconTarget(ilStudyProgrammeProgress $a_progress)
getTemplate($a_component, $a_file, $a_remove_unknown_vars, $a_remove_empty_blocks)
showMoreObjectsInfo($programme)
setVisibleOnPDMode($visible_on_pd_mode)
setOnlyRelevant($only_relevant)
getTitleForItem(ilObjStudyProgramme $a_programme)
buildProgressBar(ilStudyProgrammeProgress $a_progress)
__construct(ilStudyProgrammeProgress $a_progress)
Class ilStudyProgrammeProgress.
getId()
Get the id of the progress.
getAmountOfPoints()
Get the amount of points the user needs to achieve on the subnodes of this node.
getCurrentAmountOfPoints()
getNodeId()
Get the obj_id of the program node this progress belongs to.
special template class to simplify handling of ITX/PEAR
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl