ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilStudyProgrammeIndividualPlanTableGUI Class Reference
+ Inheritance diagram for ilStudyProgrammeIndividualPlanTableGUI:
+ Collaboration diagram for ilStudyProgrammeIndividualPlanTableGUI:

Public Member Functions

 __construct (ilObjStudyProgrammeIndividualPlanGUI $parent_obj, ilPRGAssignment $ass)
 
 getSelectableColumns ()
 Get selectable columns. More...
 
- Public Member Functions inherited from ilTable2GUI
 __construct (?object $a_parent_obj, string $a_parent_cmd="", string $a_template_context="")
 
 setOpenFormTag (bool $a_val)
 
 getOpenFormTag ()
 
 setCloseFormTag (bool $a_val)
 
 getCloseFormTag ()
 
 determineLimit ()
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 determineSelectedColumns ()
 
 isColumnSelected (string $col)
 
 getSelectedColumns ()
 
 resetOffset (bool $a_in_determination=false)
 
 initFilter ()
 
 getParentObject ()
 
 getParentCmd ()
 
 setTopAnchor (string $a_val)
 
 getTopAnchor ()
 
 setNoEntriesText (string $a_text)
 
 getNoEntriesText ()
 
 setIsDataTable (bool $a_val)
 
 getIsDataTable ()
 
 setEnableTitle (bool $a_enabletitle)
 
 getEnableTitle ()
 
 setEnableHeader (bool $a_enableheader)
 
 getEnableHeader ()
 
 setEnableNumInfo (bool $a_val)
 
 getEnableNumInfo ()
 
 setTitle (string $a_title, string $a_icon="", string $a_icon_alt="")
 
 setDescription (string $a_val)
 
 getDescription ()
 
 setOrderField (string $a_order_field)
 
 getOrderField ()
 
 setData (array $a_data)
 Set table data. More...
 
 getData ()
 
 dataExists ()
 
 setPrefix (string $a_prefix)
 set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort separately) More...
 
 getPrefix ()
 
 addFilterItem (ilTableFilterItem $a_input_item, bool $a_optional=false)
 
 addFilterItemByMetaType (string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
 Add filter by standard type. More...
 
 getFilterItems (bool $a_optionals=false)
 
 getFilterItemByPostVar (string $a_post_var)
 
 setFilterCols (int $a_val)
 
 getFilterCols ()
 
 setDisableFilterHiding (bool $a_val=true)
 
 getDisableFilterHiding ()
 
 isFilterSelected (string $a_col)
 Is given filter selected? More...
 
 getSelectedFilters ()
 
 determineSelectedFilters ()
 
 setCustomPreviousNext (string $a_prev_link, string $a_next_link)
 
 setFormAction (string $a_form_action, bool $a_multipart=false)
 
 getFormAction ()
 
 setFormName (string $a_name="")
 
 getFormName ()
 get the name of the parent form More...
 
 setId (string $a_val)
 
 getId ()
 
 setDisplayAsBlock (bool $a_val)
 
 getDisplayAsBlock ()
 
 setSelectAllCheckbox (string $a_select_all_checkbox, bool $a_select_all_on_top=false)
 
 setExternalSorting (bool $a_val)
 
 getExternalSorting ()
 
 setFilterCommand (string $a_val, string $a_caption="")
 
 getFilterCommand ()
 
 setResetCommand (string $a_val, string $a_caption="")
 
 getResetCommand ()
 
 setExternalSegmentation (bool $a_val)
 
 getExternalSegmentation ()
 
 setRowTemplate (string $a_template, string $a_template_dir="")
 Set row template. More...
 
 setDefaultOrderField (string $a_defaultorderfield)
 
 getDefaultOrderField ()
 
 setDefaultOrderDirection (string $a_defaultorderdirection)
 
 getDefaultOrderDirection ()
 
 setDefaultFilterVisiblity (bool $a_status)
 
 getDefaultFilterVisibility ()
 
 clearCommandButtons ()
 
 addCommandButton (string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
 
 addCommandButtonInstance (ilButtonBase $a_button)
 
 addMultiItemSelectionButton (string $a_sel_var, array $a_options, string $a_cmd, string $a_text, string $a_default_selection='')
 
 setCloseCommand (string $a_link)
 
 addMultiCommand (string $a_cmd, string $a_text)
 
 addHiddenInput (string $a_name, string $a_value)
 
 addHeaderCommand (string $a_href, string $a_text, string $a_target="", string $a_img="")
 
 setTopCommands (bool $a_val)
 
 getTopCommands ()
 
 addColumn (string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
 getNavParameter ()
 
 setOrderLink (string $key, string $order_dir)
 
 fillHeader ()
 
 determineOffsetAndOrder (bool $a_omit_offset=false)
 
 storeNavParameter ()
 
 getHTML ()
 Get HTML. More...
 
 numericOrdering (string $a_field)
 Should this field be sorted numeric? More...
 
 render ()
 
 writeFilterToSession ()
 
 resetFilter ()
 
 fillFooter ()
 
 getLinkbar (string $a_num)
 
 fillHiddenRow ()
 
 fillActionRow ()
 
 setHeaderHTML (string $html)
 
 storeProperty (string $type, string $value)
 
 loadProperty (string $type)
 
 getCurrentState ()
 get current settings for order, limit, columns and filter More...
 
 setContext (string $id)
 
 getContext ()
 
 setShowRowsSelector (bool $a_value)
 Toggle rows-per-page selector. More...
 
 getShowRowsSelector ()
 
 getLimit ()
 
 getOffset ()
 
 setExportFormats (array $formats)
 Set available export formats. More...
 
 setPrintMode (bool $a_value=false)
 
 getPrintMode ()
 
 getExportMode ()
 
 exportData (int $format, bool $send=false)
 Export and optionally send current table data. More...
 
 setEnableAllCommand (bool $a_value)
 
 setRowSelectorLabel (string $row_selector_label)
 
 getRowSelectorLabel ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 setLimit (int $a_limit=0, int $a_default_limit=0)
 set max. More...
 
- Public Member Functions inherited from ilTableGUI
 __construct (array $a_data=[], bool $a_global_tpl=true)
 
 setTemplate (ilTemplate $a_tpl)
 
 getTemplateObject ()
 
 setData (array $a_data)
 Set table data. More...
 
 getData ()
 
 setTitle (string $a_title, string $a_icon="", string $a_icon_alt="")
 
 setHelp (string $a_help_page, string $a_help_icon, string $a_help_icon_alt="")
 
 setHeaderNames (array $a_header_names)
 
 getColumnCount ()
 
 setHeaderVars (array $a_header_vars, array $a_header_params=[])
 
 setColumnWidth (array $a_column_width)
 set table column widths More...
 
 setOneColumnWidth (string $a_column_width, int $a_column_number)
 
 setMaxCount (int $a_max_count)
 set max. More...
 
 setLimit (int $a_limit=0, int $a_default_limit=0)
 set max. More...
 
 getLimit ()
 
 setPrefix (string $a_prefix)
 set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort separately) More...
 
 setOffset (int $a_offset)
 set dataset offset More...
 
 getOffset ()
 
 setOrderColumn (string $a_order_column="", string $a_default_column="")
 
 getOrderColumn ()
 
 setOrderDirection (string $a_order_direction)
 
 getOrderDirection ()
 
 setFooter (string $a_style, string $a_previous="", string $a_next="")
 
 enable (string $a_module_name)
 
 disable (string $a_module_name)
 
 sortData ()
 
 render ()
 
 renderHeader ()
 
 setOrderLink (string $key, string $order_dir)
 
 setStyle (string $a_element, string $a_style)
 
 getStyle (string $a_element)
 
 setBase (string $a_base)
 
 getBase ()
 
 getFormName ()
 get the name of the parent form More...
 
 setFormName (string $a_name="cmd")
 
 getSelectAllCheckbox ()
 get the name of the checkbox that should be toggled with a select all button More...
 
 setSelectAllCheckbox (string $a_select_all_checkbox)
 
 clearActionButtons ()
 
 addActionButton (string $btn_name, string $btn_value)
 

Protected Member Functions

 fillRow (array $a_set)
 Standard Version of Fill Row. More...
 
 fetchData ()
 
 getManualStatusSelect (string $progress_id, int $status, int $node_lifecycle_status)
 
 getRequiredPointsInput (string $progress_id, int $status, string $points_required)
 
 getDeadlineInput (string $progress_id, $deadline)
 
- Protected Member Functions inherited from ilTable2GUI
 getRequestedValues ()
 
 prepareOutput ()
 Anything that must be done before HTML is generated. More...
 
 isFilterVisible ()
 Check if filter is visible: manually shown (session, db) or default value set. More...
 
 isAdvMDFilter (ilAdvancedMDRecordGUI $a_gui, ilTableFilterItem $a_element)
 Check if filter element is based on adv md. More...
 
 fillRow (array $a_set)
 Standard Version of Fill Row. More...
 
 getFilterValue (ilTableFilterItem $a_item)
 Get current filter value. More...
 
 setFilterValue (ilTableFilterItem $a_item, $a_value)
 
 fillMetaExcel (ilExcel $a_excel, int &$a_row)
 Add meta information to excel export. More...
 
 fillHeaderExcel (ilExcel $a_excel, int &$a_row)
 Excel Version of Fill Header. More...
 
 fillRowExcel (ilExcel $a_excel, int &$a_row, array $a_set)
 Excel Version of Fill Row. More...
 
 fillMetaCSV (ilCSVWriter $a_csv)
 Add meta information to csv export. More...
 
 fillHeaderCSV (ilCSVWriter $a_csv)
 CSV Version of Fill Header. More...
 
 fillRowCSV (ilCSVWriter $a_csv, array $a_set)
 CSV Version of Fill Row. More...
 

Protected Attributes

ilDBInterface $db
 
ilPRGAssignment $assignment
 
string $possible_image
 
string $not_possible_image
 
- Protected Attributes inherited from ilTable2GUI
string $requested_nav_par2 = ""
 
string $requested_nav_par = ""
 
string $requested_nav_par1 = ""
 
ILIAS Table TableGUIRequest $table_request = null
 
array $selected_columns = []
 
ilCtrl $ctrl
 
object $parent_obj = null
 
string $parent_cmd = ""
 
string $close_command = ""
 
string $top_anchor = "il_table_top"
 
array $filters = array()
 
array $optional_filters = array()
 
string $filter_cmd = 'applyFilter'
 
string $reset_cmd = 'resetFilter'
 
int $filter_cols = 5
 
bool $ext_sort = false
 
bool $ext_seg = false
 
string $context = ""
 
array $mi_sel_buttons = []
 
bool $disable_filter_hiding = false
 
bool $top_commands = true
 
array $selectable_columns = array()
 
array $selected_column = array()
 
bool $show_rows_selector = true
 
bool $rows_selector_off = false
 
bool $nav_determined = false
 
bool $limit_determined = false
 
bool $filters_determined = false
 
bool $columns_determined = false
 
bool $open_form_tag = true
 
bool $close_form_tag = true
 
array $export_formats = []
 
int $export_mode = 0
 
bool $print_mode = false
 
bool $enable_command_for_all = false
 
bool $restore_filter = false
 
array $restore_filter_values = []
 
bool $default_filter_visibility = false
 
array $sortable_fields = array()
 
bool $prevent_double_submission = true
 
string $row_selector_label = ""
 
bool $select_all_on_top = false
 
array $sel_buttons = []
 
string $nav_value = ''
 
string $noentriestext = ''
 
string $css_row = ''
 
bool $display_as_block = false
 
string $description = ''
 
string $id = ""
 
bool $custom_prev_next = false
 
string $reset_cmd_txt = ""
 
string $defaultorderfield = ""
 
string $defaultorderdirection = ""
 
array $column = []
 
bool $datatable = false
 
bool $num_info = false
 
bool $form_multipart = false
 
array $row_data = []
 
string $order_field = ""
 
array $selected_filter = []
 
string $form_action = ""
 
string $formname = ""
 
string $sort_order = ""
 
array $buttons = []
 
array $multi = []
 
array $hidden_inputs = []
 
array $header_commands = []
 
string $row_template = ""
 
string $row_template_dir = ""
 
string $filter_cmd_txt = ""
 
string $custom_prev = ""
 
string $custom_next = ""
 
array $raw_post_data = null
 
ilGlobalTemplateInterface $main_tpl
 
- Protected Attributes inherited from ilTableGUI
string $sort_order
 
string $link_params
 
array $header_params
 
 $tpl
 
ilLanguage $lng
 

Private Attributes

const SEL_COLUMN_COMPLETION_DATE = "completion_date"
 
const SEL_COLUMN_DEADLINE = "prg_deadline"
 
const SEL_COLUMN_ASSIGNMENT_DATE = "assignment_date"
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTable2GUI
static getAllCommandLimit ()
 
- Static Public Member Functions inherited from ilTableGUI
static linkbar (string $AScript, int $AHits, int $ALimit, int $AOffset, array $AParams=array(), array $ALayout=array(), string $prefix='')
 
- Data Fields inherited from ilTable2GUI
const FILTER_TEXT = 1
 
const FILTER_SELECT = 2
 
const FILTER_DATE = 3
 
const FILTER_LANGUAGE = 4
 
const FILTER_NUMBER_RANGE = 5
 
const FILTER_DATE_RANGE = 6
 
const FILTER_DURATION_RANGE = 7
 
const FILTER_DATETIME_RANGE = 8
 
const FILTER_CHECKBOX = 9
 
const EXPORT_EXCEL = 1
 
const EXPORT_CSV = 2
 
const ACTION_ALL_LIMIT = 1000
 
- Data Fields inherited from ilTableGUI
string $title = ""
 
string $icon = ""
 
string $icon_alt = ""
 
string $help_page = ""
 
string $help_icon = ""
 
string $help_icon_alt = ""
 
array $header_names = []
 
array $header_vars = []
 
array $linkbar_vars = []
 
array $data = []
 
int $column_count = 0
 
array $column_width = []
 
int $max_count = 0
 
int $limit = 0
 
bool $max_limit = false
 
int $offset = 0
 
string $order_column = ""
 
string $order_direction = ""
 
string $footer_style = ""
 
string $footer_previous = ""
 
string $footer_next = ""
 
bool $lang_support = true
 
bool $global_tpl = false
 
string $form_name = ""
 
string $select_all_checkbox = ""
 
array $action_buttons = []
 
string $prefix = ""
 
string $base = ""
 
array $enabled
 
array $styles
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilStudyProgrammeIndividualPlanTableGUI::__construct ( ilObjStudyProgrammeIndividualPlanGUI  $parent_obj,
ilPRGAssignment  $ass 
)

Definition at line 33 of file class.ilStudyProgrammeIndividualPlanTableGUI.php.

36 {
37 $this->setId("manage_indiv");
38
39 parent::__construct($parent_obj, 'manage');
40
41 global $DIC;
42 $this->ctrl = $DIC['ilCtrl'];
43 $this->lng = $DIC['lng'];
44 $this->db = $DIC['ilDB'];
45
46 $this->assignment = $ass;
47
48 $this->setEnableTitle(true);
49 $this->setTopCommands(false);
50 $this->setEnableHeader(true);
51 // TODO: switch this to internal sorting/segmentation
52 $this->setExternalSorting(false);
53 $this->setExternalSegmentation(false);
54 $this->setRowTemplate("tpl.individual_plan_table_row.html", "components/ILIAS/StudyProgramme");
55 $this->setDefaultOrderDirection("asc");
56
57 $this->getParentObject()->appendIndividualPlanActions($this);
58
59 $columns = [
60 "status",
61 "title",
62 "prg_points_current",
63 "prg_points_required",
64 "prg_manual_status",
65 "prg_possible",
66 "prg_changed_by",
67 "prg_completion_by"
68 ];
69
70 foreach ($this->getSelectedColumns() as $column) {
71 $columns[] = $column;
72 }
73
74 foreach ($columns as $lng_var) {
75 $this->addColumn($this->lng->txt($lng_var));
76 }
77
78 $plan = $this->fetchData();
79
80 $this->setMaxCount(count($plan));
81 $this->setData($plan);
82
83 $this->determineLimit();
85
86 $ui_factory = $DIC['ui.factory'];
87 $ui_renderer = $DIC['ui.renderer'];
88 $this->possible_image = $ui_renderer->render(
89 $ui_factory->symbol()->icon()->custom(ilUtil::getImagePath("standard/icon_ok.svg"), 'ok')->withSize('small')
90 );
91 $this->not_possible_image = $ui_renderer->render(
92 $ui_factory->symbol()->icon()->custom(ilUtil::getImagePath("standard/icon_not_ok.svg"), 'not ok')->withSize('small')
93 );
94 }
determineOffsetAndOrder(bool $a_omit_offset=false)
setExternalSegmentation(bool $a_val)
setEnableTitle(bool $a_enabletitle)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setEnableHeader(bool $a_enableheader)
setTopCommands(bool $a_val)
setExternalSorting(bool $a_val)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setId(string $a_val)
setDefaultOrderDirection(string $a_defaultorderdirection)
setData(array $a_data)
Set table data.
setMaxCount(int $a_max_count)
set max.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References ilTable2GUI\$column, $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilTable2GUI\addColumn(), ILIAS\Repository\ctrl(), ilTable2GUI\determineLimit(), ilTable2GUI\determineOffsetAndOrder(), fetchData(), ilUtil\getImagePath(), ilTable2GUI\getParentObject(), ilTable2GUI\getSelectedColumns(), ILIAS\Repository\lng(), ilTable2GUI\setData(), ilTable2GUI\setDefaultOrderDirection(), ilTable2GUI\setEnableHeader(), ilTable2GUI\setEnableTitle(), ilTable2GUI\setExternalSegmentation(), ilTable2GUI\setExternalSorting(), ilTable2GUI\setId(), ilTableGUI\setMaxCount(), ilTable2GUI\setRowTemplate(), and ilTable2GUI\setTopCommands().

+ Here is the call graph for this function:

Member Function Documentation

◆ fetchData()

ilStudyProgrammeIndividualPlanTableGUI::fetchData ( )
protected

Definition at line 156 of file class.ilStudyProgrammeIndividualPlanTableGUI.php.

156 : array
157 {
158 $prg_id = $this->assignment->getRootId();
160
161 $ass_id = $this->assignment->getId();
162 $usr_id = $this->assignment->getUserId();
163 $plan = array();
164
165 $prg->applyToSubTreeNodes(
166 function ($node) use ($prg_id, $ass_id, $usr_id, &$plan, $prg) {
167 $progress = $this->assignment->getProgressForNode($node->getId());
168 $completion_by = $progress->getCompletionBy();
169
170 if ($completion_by === ilPRGProgress::COMPLETED_BY_SUBNODES) {
171 $successful_subnodes = array_filter(
172 $progress->getSubnodes(),
173 static fn(ilPRGProgress $pgs): bool => $pgs->isSuccessful()
174 );
175 $successful_subnode_ids = array_map(
176 static fn(ilPRGProgress $pgs): int => $pgs->getNodeId(),
177 $successful_subnodes
178 );
179 $out = array_map(
180 fn(int $node_obj_id): string => ilStudyProgrammeUserTable::lookupTitle($node_obj_id),
181 $successful_subnode_ids
182 );
183 $completion_by = implode(', ', $out);
184 } else {
185 $completion_by = $progress->isSuccessful() ? ilStudyProgrammeUserTable::lookupTitle($completion_by) : '';
186 }
187
188 $programme = ilObjStudyProgramme::getInstanceByObjId($progress->getNodeId());
189 $plan[] = [
190 "status" => $progress->getStatus(),
191 "status_repr" => $programme->statusToRepr($progress->getStatus()),
192 "title" => $node->getTitle(),
193 "points_current" => $progress->getCurrentAmountOfPoints(),
194 "points_required" => $progress->getAmountOfPoints(),
195 "possible" => $progress->isSuccessful()
196 || $programme->canBeCompleted($progress)
197 || (!$progress->isRelevant() && $programme->getStatus() !== ilStudyProgrammeSettings::STATUS_DRAFT),
198 "changed_by" => ilObjUser::_lookupLogin($progress->getLastChangeBy()),
199 "completion_by" => $completion_by,
200 "progress_id" => $progress->getId(),
201 //draft/active/outdated
202 "program_status" => $programme->getStatus(),
203 "assignment_date" => $progress->getAssignmentDate()->format('d.m.Y'),
204 "deadline" => $progress->isSuccessful() ? null : $progress->getDeadline(),
205 "completion_date" => $progress->getCompletionDate() ? $progress->getCompletionDate()->format('d.m.Y') : ''
206 ];
207 },
208 true
209 );
210 return $plan;
211 }
$out
Definition: buildRTE.php:24
return true
static getInstanceByObjId(int $obj_id)
static _lookupLogin(int $a_user_id)
A Progress is the status of a user on a single node of an assignment; it is unique by assignment_id:u...
if(!file_exists('../ilias.ini.php'))

References $ass_id, $out, ilObjUser\_lookupLogin(), ilPRGProgress\COMPLETED_BY_SUBNODES, ilObjStudyProgramme\getInstanceByObjId(), ilPRGProgress\getNodeId(), if, ilPRGProgress\isSuccessful(), ilStudyProgrammeUserTable\lookupTitle(), ilStudyProgrammeSettings\STATUS_DRAFT, and true.

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRow()

ilStudyProgrammeIndividualPlanTableGUI::fillRow ( array  $a_set)
protected

Standard Version of Fill Row.

Most likely to be overwritten by derived class.

Parameters
array<string,mixed>$a_set data array

Reimplemented from ilTable2GUI.

Definition at line 96 of file class.ilStudyProgrammeIndividualPlanTableGUI.php.

96 : void
97 {
98 $this->tpl->setVariable("STATUS", $a_set['status_repr']);
99
100 $title = $a_set["title"];
101 if ((int) $a_set["program_status"] === ilStudyProgrammeSettings::STATUS_DRAFT) {
102 $title .= " (" . $this->lng->txt("prg_status_draft") . ")";
103 } elseif ((int) $a_set["program_status"] === ilStudyProgrammeSettings::STATUS_OUTDATED) {
104 $title .= " (" . $this->lng->txt("prg_status_outdated") . ")";
105 }
106
107 $this->tpl->setVariable("TITLE", $title);
108 $this->tpl->setVariable("POINTS_CURRENT", $a_set["points_current"]);
109 $this->tpl->setVariable(
110 "POINTS_REQUIRED",
111 $this->getRequiredPointsInput($a_set["progress_id"], $a_set["status"], (string) $a_set["points_required"])
112 );
113 $this->tpl->setVariable("MANUAL_STATUS", $this->getManualStatusSelect(
114 $a_set["progress_id"],
115 (int) $a_set["status"],
116 (int) $a_set["program_status"],
117 ));
118 $this->tpl->setVariable("POSSIBLE", $a_set["possible"] ? $this->possible_image : $this->not_possible_image);
119 $this->tpl->setVariable("CHANGED_BY", $a_set["changed_by"]);
120 $this->tpl->setVariable("COMPLETION_BY", $a_set["completion_by"]);
121
122 foreach ($this->getSelectedColumns() as $column) {
123 switch ($column) {
125 $this->tpl->setCurrentBlock("assignment_date");
126 $this->tpl->setVariable("ASSIGNMENT_DATE", $a_set["assignment_date"]);
127 $this->tpl->parseCurrentBlock("assignment_date");
128 break;
130 $this->tpl->setCurrentBlock("deadline");
131 $this->tpl->setVariable("DEADLINE", $this->getDeadlineInput($a_set["progress_id"], $a_set["deadline"]));
132 $this->tpl->parseCurrentBlock("deadline");
133 break;
135 $this->tpl->setCurrentBlock("completion_date");
136 $this->tpl->setVariable("COMPLETION_DATE", $a_set["completion_date"]);
137 $this->tpl->parseCurrentBlock("completion_date");
138 break;
139 }
140 }
141 }
getRequiredPointsInput(string $progress_id, int $status, string $points_required)
getManualStatusSelect(string $progress_id, int $status, int $node_lifecycle_status)

References ilTable2GUI\$column, ilTableGUI\$title, getDeadlineInput(), getManualStatusSelect(), getRequiredPointsInput(), ilTable2GUI\getSelectedColumns(), ILIAS\Repository\lng(), SEL_COLUMN_ASSIGNMENT_DATE, SEL_COLUMN_COMPLETION_DATE, SEL_COLUMN_DEADLINE, ilStudyProgrammeSettings\STATUS_DRAFT, and ilStudyProgrammeSettings\STATUS_OUTDATED.

+ Here is the call graph for this function:

◆ getDeadlineInput()

ilStudyProgrammeIndividualPlanTableGUI::getDeadlineInput ( string  $progress_id,
  $deadline 
)
protected

Definition at line 255 of file class.ilStudyProgrammeIndividualPlanTableGUI.php.

255 : string
256 {
257 $parent = $this->getParentObject();
258 $gui = new ilDateTimeInputGUI("", $parent::POST_VAR_DEADLINE . "[$progress_id]");
259 $gui->setDate($deadline ? new ilDateTime($deadline->format('Y-m-d H:i:s'), IL_CAL_DATETIME) : null);
260 return $gui->render();
261 }
const IL_CAL_DATETIME
This class represents a date/time property in a property form.
@classDescription Date and time handling

References ilTable2GUI\getParentObject(), and IL_CAL_DATETIME.

Referenced by fillRow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getManualStatusSelect()

ilStudyProgrammeIndividualPlanTableGUI::getManualStatusSelect ( string  $progress_id,
int  $status,
int  $node_lifecycle_status 
)
protected

Definition at line 213 of file class.ilStudyProgrammeIndividualPlanTableGUI.php.

213 : string
214 {
215 $parent = $this->getParentObject();
216 $options = [
217 $parent::MANUAL_STATUS_NONE => '-',
218 ilPRGProgress::STATUS_IN_PROGRESS => $this->lng->txt("prg_status_in_progress"),
219 ilPRGProgress::STATUS_ACCREDITED => $this->lng->txt("prg_status_accredited"),
220 ilPRGProgress::STATUS_NOT_RELEVANT => $this->lng->txt("prg_status_not_relevant")
221 //COMPLETED/FAILED are not to be set manually.
222 ];
223
225
226 $options = array_filter(
227 $options,
228 static function ($o) use ($allowed, $parent, $node_lifecycle_status): bool {
229 return (in_array($o, $allowed) || $o === $parent::MANUAL_STATUS_NONE)
230 && ($node_lifecycle_status !== ilStudyProgrammeSettings::STATUS_DRAFT);
231 },
232 ARRAY_FILTER_USE_KEY
233 );
234
235 $select = new ilSelectInputGUI("", $parent::POST_VAR_STATUS . "[$progress_id]");
236 $select->setOptions($options);
237 $select->setValue($parent::MANUAL_STATUS_NONE);
238
239 return $select->render();
240 }
static getAllowedTargetStatusFor(int $status_from)
This class represents a selection list property in a property form.

References ilPRGProgress\getAllowedTargetStatusFor(), ilTable2GUI\getParentObject(), ILIAS\Repository\lng(), ilPRGProgress\STATUS_ACCREDITED, ilStudyProgrammeSettings\STATUS_DRAFT, ilPRGProgress\STATUS_IN_PROGRESS, and ilPRGProgress\STATUS_NOT_RELEVANT.

Referenced by fillRow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRequiredPointsInput()

ilStudyProgrammeIndividualPlanTableGUI::getRequiredPointsInput ( string  $progress_id,
int  $status,
string  $points_required 
)
protected

Definition at line 242 of file class.ilStudyProgrammeIndividualPlanTableGUI.php.

242 : string
243 {
244 if ($status != ilPRGProgress::STATUS_IN_PROGRESS) {
245 return $points_required;
246 }
247
248 $parent = $this->getParentObject();
249 $input = new ilNumberInputGUI("", $parent::POST_VAR_REQUIRED_POINTS . "[$progress_id]");
250 $input->setValue($points_required);
251 $input->setSize(5);
252 return $input->render();
253 }
This class represents a number property in a property form.

References ilTable2GUI\getParentObject(), and ilPRGProgress\STATUS_IN_PROGRESS.

Referenced by fillRow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSelectableColumns()

ilStudyProgrammeIndividualPlanTableGUI::getSelectableColumns ( )

Get selectable columns.

Returns
array key: column id, val: true/false -> default on/off

Reimplemented from ilTable2GUI.

Definition at line 143 of file class.ilStudyProgrammeIndividualPlanTableGUI.php.

143 : array
144 {
145 $cols = array();
146
148 "txt" => $this->lng->txt("assignment_date"));
149 $cols[self::SEL_COLUMN_DEADLINE] = array(
150 "txt" => $this->lng->txt("prg_deadline"));
152 "txt" => $this->lng->txt("completion_date"));
153 return $cols;
154 }

References ILIAS\Repository\lng(), SEL_COLUMN_ASSIGNMENT_DATE, SEL_COLUMN_COMPLETION_DATE, and SEL_COLUMN_DEADLINE.

+ Here is the call graph for this function:

Field Documentation

◆ $assignment

ilPRGAssignment ilStudyProgrammeIndividualPlanTableGUI::$assignment
protected

◆ $db

ilDBInterface ilStudyProgrammeIndividualPlanTableGUI::$db
protected

◆ $not_possible_image

string ilStudyProgrammeIndividualPlanTableGUI::$not_possible_image
protected

◆ $possible_image

string ilStudyProgrammeIndividualPlanTableGUI::$possible_image
protected

◆ SEL_COLUMN_ASSIGNMENT_DATE

const ilStudyProgrammeIndividualPlanTableGUI::SEL_COLUMN_ASSIGNMENT_DATE = "assignment_date"
private

◆ SEL_COLUMN_COMPLETION_DATE

const ilStudyProgrammeIndividualPlanTableGUI::SEL_COLUMN_COMPLETION_DATE = "completion_date"
private

◆ SEL_COLUMN_DEADLINE

const ilStudyProgrammeIndividualPlanTableGUI::SEL_COLUMN_DEADLINE = "prg_deadline"
private

The documentation for this class was generated from the following file: