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');
32 $this->assignment = $a_ass;
40 $this->
setRowTemplate(
"tpl.individual_plan_table_row.html",
"Modules/StudyProgramme");
47 ,
"prg_points_current" 48 ,
"prg_points_required" 66 $this->possible_image =
"<img src='".ilUtil::getImagePath(
"icon_ok.svg").
"' alt='ok'>";
67 $this->not_possible_image =
"<img src='".ilUtil::getImagePath(
"icon_not_ok.svg").
"' alt='not ok'>";
75 $title .=
" (".$this->lng->txt(
"prg_status_draft").
")";
77 $title .=
" (".$this->lng->txt(
"prg_status_outdated").
")";
80 $this->tpl->setVariable(
"TITLE",
$title);
81 $this->tpl->setVariable(
"POINTS_CURRENT", $a_set[
"points_current"]);
84 , $a_set[
"points_required"]));
85 $this->tpl->setVariable(
"MANUAL_STATUS", $this->
getManualStatusSelect($a_set[
"progress_id"], $a_set[
"status"]));
86 $this->tpl->setVariable(
"POSSIBLE", $a_set[
"possible"] ? $this->possible_image : $this->not_possible_image);
87 $this->tpl->setVariable(
"CHANGED_BY", $a_set[
"changed_by"]);
88 $this->tpl->setVariable(
"COMPLETION_BY", $a_set[
"completion_by"]);
92 $prg = $this->assignment->getStudyProgramme();
93 $prg_id = $prg->getId();
94 $ass_id = $this->assignment->getId();
95 $usr_id = $this->assignment->getUserId();
98 $prg->applyToSubTreeNodes(
function($node) use ($prg_id, $ass_id, $usr_id, &$plan) {
100 $completion_by_id = $progress->getCompletionBy();
101 if ($completion_by_id) {
103 if (!$completion_by) {
105 if($type ==
"crsr") {
112 $completion_by = implode(
", ", $progress->getNamesOfCompletedOrAccreditedChildren());
114 $plan[] =
array(
"status" => $progress->getStatus()
115 ,
"title" => $node->getTitle()
116 ,
"points_current" => $progress->getCurrentAmountOfPoints()
117 ,
"points_required" => $progress->getAmountOfPoints()
118 ,
"possible" => $progress->isSuccessful() || $progress->canBeCompleted() || !$progress->isRelevant()
120 ,
"completion_by" => $completion_by
121 ,
"progress_id" => $progress->getId()
122 ,
"program_status" => $progress->getStudyProgramme()->getStatus()
134 $status_title = $parent->getManualStatusPostVarTitle();
135 $manual_status_none = $parent->getManualStatusNone();
136 $manual_status_not_relevant = $parent->getManualStatusNotRelevant();
137 $manual_status_accredited = $parent->getManualStatusAccredited();
139 require_once(
"Services/Form/classes/class.ilSelectInputGUI.php");
141 $select->setOptions(
array 142 ( $manual_status_none =>
"-" 143 , $manual_status_accredited => $this->lng->txt(
"prg_status_accredited")
144 , $manual_status_not_relevant => $this->lng->txt(
"prg_status_not_relevant")
147 $select->setValue($manual_status_not_relevant);
150 $select->setValue($manual_status_accredited);
153 return $select->render();
158 return $a_points_required;
161 $required_points_title = $this->
getParentObject()->getRequiredPointsPostVarTitle();
163 require_once(
"Services/Form/classes/class.ilNumberInputGUI.php");
164 $input =
new ilNumberInputGUI(
"", $required_points_title.
"[$a_progress_id]");
165 $input->setValue($a_points_required);
167 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.
Create styles array
The data for the language used.
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.