5 require_once(
"Services/Table/classes/class.ilTable2GUI.php");
6 require_once(
"Modules/StudyProgramme/classes/class.ilStudyProgrammeUserProgress.php");
7 require_once(
"Modules/StudyProgramme/classes/class.ilObjStudyProgramme.php");
8 require_once(
"Services/Utilities/classes/class.ilUtil.php");
21 $this->
setId(
"manage_indiv");
22 parent::__construct($a_parent_obj,
'manage');
29 $this->assignment = $a_ass;
37 $this->
setRowTemplate(
"tpl.individual_plan_table_row.html",
"Modules/StudyProgramme");
44 ,
"prg_points_current" 45 ,
"prg_points_required" 63 $this->possible_image =
"<img src='".ilUtil::getImagePath(
"icon_ok.svg").
"' alt='ok'>";
64 $this->not_possible_image =
"<img src='".ilUtil::getImagePath(
"icon_not_ok.svg").
"' alt='not ok'>";
72 $title .=
" (".$this->lng->txt(
"prg_status_draft").
")";
74 $title .=
" (".$this->lng->txt(
"prg_status_outdated").
")";
77 $this->tpl->setVariable(
"TITLE",
$title);
78 $this->tpl->setVariable(
"POINTS_CURRENT", $a_set[
"points_current"]);
81 , $a_set[
"points_required"]));
82 $this->tpl->setVariable(
"MANUAL_STATUS", $this->
getManualStatusSelect($a_set[
"progress_id"], $a_set[
"status"]));
83 $this->tpl->setVariable(
"POSSIBLE", $a_set[
"possible"] ? $this->possible_image : $this->not_possible_image);
84 $this->tpl->setVariable(
"CHANGED_BY", $a_set[
"changed_by"]);
85 $this->tpl->setVariable(
"COMPLETION_BY", $a_set[
"completion_by"]);
89 $prg = $this->assignment->getStudyProgramme();
90 $prg_id = $prg->getId();
91 $ass_id = $this->assignment->getId();
92 $usr_id = $this->assignment->getUserId();
95 $prg->applyToSubTreeNodes(
function($node) use ($prg_id, $ass_id, $usr_id, &$plan) {
97 $completion_by_id = $progress->getCompletionBy();
98 if ($completion_by_id) {
100 if (!$completion_by) {
102 if($type ==
"crsr") {
109 $completion_by = implode(
", ", $progress->getNamesOfCompletedOrAccreditedChildren());
111 $plan[] = array(
"status" => $progress->getStatus()
112 ,
"title" => $node->getTitle()
113 ,
"points_current" => $progress->getCurrentAmountOfPoints()
114 ,
"points_required" => $progress->getAmountOfPoints()
115 ,
"possible" => $progress->isSuccessful() || $progress->canBeCompleted() || !$progress->isRelevant()
117 ,
"completion_by" => $completion_by
118 ,
"progress_id" => $progress->getId()
119 ,
"program_status" => $progress->getStudyProgramme()->getStatus()
131 $status_title = $parent->getManualStatusPostVarTitle();
132 $manual_status_none = $parent->getManualStatusNone();
133 $manual_status_not_relevant = $parent->getManualStatusNotRelevant();
134 $manual_status_accredited = $parent->getManualStatusAccredited();
136 require_once(
"Services/Form/classes/class.ilSelectInputGUI.php");
138 $select->setOptions(array
139 ( $manual_status_none =>
"-" 140 , $manual_status_accredited => $this->lng->txt(
"prg_status_accredited")
141 , $manual_status_not_relevant => $this->lng->txt(
"prg_status_not_relevant")
144 $select->setValue($manual_status_not_relevant);
147 $select->setValue($manual_status_accredited);
150 return $select->render();
155 return $a_points_required;
158 $required_points_title = $this->
getParentObject()->getRequiredPointsPostVarTitle();
160 require_once(
"Services/Form/classes/class.ilNumberInputGUI.php");
161 $input =
new ilNumberInputGUI(
"", $required_points_title.
"[$a_progress_id]");
162 $input->setValue($a_points_required);
164 return $input->render();
static _lookupLogin($a_user_id)
lookup login
static getInstance($a_assignment_id, $a_program_id, $a_user_id)
Get an instance.
__construct($a_parent_obj, ilStudyProgrammeUserAssignment $a_ass)
setExternalSorting($a_val)
Set external sorting.
static statusToRepr($a_status)
Get a user readable representation of a status.
setExternalSegmentation($a_val)
Set external segmentation.
static _lookupTitle($a_id)
lookup object title
determineLimit()
Determine the limit.
getParentObject()
Get parent object.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
Class ilStudyProgrammeIndividualPlanTableGUI.
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
static _lookupTitle($a_obj_id)
Overwitten from base class.
const STATUS_NOT_RELEVANT
setRowTemplate($a_template, $a_template_dir="")
Set row template.
static _lookupType($a_id, $a_reference=false)
lookup object type
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
setEnableHeader($a_enableheader)
Set Enable Header.
getManualStatusSelect($a_progress_id, $a_status)
setMaxCount($a_max_count)
set max.
setEnableTitle($a_enabletitle)
Set Enable Title.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
getRequiredPointsInput($a_progress_id, $a_status, $a_points_required)
Represents one assignment of a user to a study programme.