ILIAS  release_8 Revision v8.23
ilStudyProgrammeIndividualPlanTableGUI Class Reference
+ Inheritance diagram for ilStudyProgrammeIndividualPlanTableGUI:
+ Collaboration diagram for ilStudyProgrammeIndividualPlanTableGUI:

Public Member Functions

 __construct (ilObjStudyProgrammeIndividualPlanGUI $parent_obj, ilPRGAssignment $ass)
 
 getSelectableColumns ()
 
- 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)
 
 getData ()
 
 dataExists ()
 
 setPrefix (string $a_prefix)
 
 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 ()
 
 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 ()
 
 setShowTemplates (bool $a_value)
 
 getShowTemplates ()
 
 restoreTemplate (string $a_name)
 Restore state from template. More...
 
 saveTemplate (string $a_name)
 Save current state as template. More...
 
 deleteTemplate (string $a_name)
 
 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)
 
- 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)
 
 fetchData ()
 
 getManualStatusSelect (string $progress_id, int $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_tmpl_delete
 
string $requested_tmpl_create
 
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_templates = false
 
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.

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().

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", "Modules/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();
84  $this->determineOffsetAndOrder();
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("icon_ok.svg"), 'ok')->withSize('small')
90  );
91  $this->not_possible_image = $ui_renderer->render(
92  $ui_factory->symbol()->icon()->custom(ilUtil::getImagePath("icon_not_ok.svg"), 'not ok')->withSize('small')
93  );
94  }
setData(array $a_data)
setTopCommands(bool $a_val)
setEnableTitle(bool $a_enabletitle)
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
setId(string $a_val)
global $DIC
Definition: feed.php:28
setExternalSorting(bool $a_val)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
__construct(Container $dic, ilPlugin $plugin)
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)
determineOffsetAndOrder(bool $a_omit_offset=false)
setEnableHeader(bool $a_enableheader)
setMaxCount(int $a_max_count)
set max.
setExternalSegmentation(bool $a_val)
+ Here is the call graph for this function:

Member Function Documentation

◆ fetchData()

ilStudyProgrammeIndividualPlanTableGUI::fetchData ( )
protected

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

References $type, ilObjUser\_lookupLogin(), ilContainerReference\_lookupTitle(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilObjStudyProgramme\getInstanceByObjId(), and ilStudyProgrammeUserTable\lookupTitle().

Referenced by __construct().

155  : array
156  {
157  $prg_id = $this->assignment->getRootId();
159 
160  $ass_id = $this->assignment->getId();
161  $usr_id = $this->assignment->getUserId();
162  $plan = array();
163 
164  $prg->applyToSubTreeNodes(
165  function ($node) use ($prg_id, $ass_id, $usr_id, &$plan, $prg) {
166  $progress = $this->assignment->getProgressForNode($node->getId());
167  $completion_by_id = $progress->getCompletionBy();
168 
169  if ($completion_by_id) {
170  $completion_by = ilObjUser::_lookupLogin($completion_by_id);
171  if (!$completion_by) {
172  $type = ilObject::_lookupType($completion_by_id);
173  if ($type === "crsr") {
174  $completion_by = ilContainerReference::_lookupTitle($completion_by_id);
175  } else {
176  $completion_by = ilObject::_lookupTitle($completion_by_id);
177  }
178  }
179  } else {
180  $completion_by = '';
181  if ($progress->isSuccessful()) {
182  if ($progress->getCompletionBy()) {
183  $completion_by = ilStudyProgrammeUserTable::lookupTitle($progress->getCompletionBy());
184  }
185  }
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() || $programme->canBeCompleted($progress) || !$progress->isRelevant(),
196  "changed_by" => ilObjUser::_lookupLogin($progress->getLastChangeBy()),
197  "completion_by" => $completion_by,
198  "progress_id" => $progress->getId(),
199  //draft/active/outdated
200  "program_status" => $programme->getStatus(),
201  "assignment_date" => $progress->getAssignmentDate()->format('d.m.Y'),
202  "deadline" => $progress->isSuccessful() ? null : $progress->getDeadline(),
203  "completion_date" => $progress->getCompletionDate() ? $progress->getCompletionDate()->format('d.m.Y') : ''
204  ];
205  },
206  true
207  );
208  return $plan;
209  }
static _lookupTitle(int $obj_id)
$type
static _lookupTitle(int $obj_id)
static getInstanceByObjId(int $obj_id)
static _lookupType(int $id, bool $reference=false)
static _lookupLogin(int $a_user_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRow()

ilStudyProgrammeIndividualPlanTableGUI::fillRow ( array  $a_set)
protected

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

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

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  ));
117  $this->tpl->setVariable("POSSIBLE", $a_set["possible"] ? $this->possible_image : $this->not_possible_image);
118  $this->tpl->setVariable("CHANGED_BY", $a_set["changed_by"]);
119  $this->tpl->setVariable("COMPLETION_BY", $a_set["completion_by"]);
120 
121  foreach ($this->getSelectedColumns() as $column) {
122  switch ($column) {
123  case self::SEL_COLUMN_ASSIGNMENT_DATE:
124  $this->tpl->setCurrentBlock("assignment_date");
125  $this->tpl->setVariable("ASSIGNMENT_DATE", $a_set["assignment_date"]);
126  $this->tpl->parseCurrentBlock("assignment_date");
127  break;
128  case self::SEL_COLUMN_DEADLINE:
129  $this->tpl->setCurrentBlock("deadline");
130  $this->tpl->setVariable("DEADLINE", $this->getDeadlineInput($a_set["progress_id"], $a_set["deadline"]));
131  $this->tpl->parseCurrentBlock("deadline");
132  break;
133  case self::SEL_COLUMN_COMPLETION_DATE:
134  $this->tpl->setCurrentBlock("completion_date");
135  $this->tpl->setVariable("COMPLETION_DATE", $a_set["completion_date"]);
136  $this->tpl->parseCurrentBlock("completion_date");
137  break;
138  }
139  }
140  }
getRequiredPointsInput(string $progress_id, int $status, string $points_required)
+ Here is the call graph for this function:

◆ getDeadlineInput()

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

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

References ilTable2GUI\getParentObject(), and IL_CAL_DATETIME.

Referenced by fillRow().

252  : string
253  {
254  $parent = $this->getParentObject();
255  $gui = new ilDateTimeInputGUI("", $parent::POST_VAR_DEADLINE . "[$progress_id]");
256  $gui->setDate($deadline ? new ilDateTime($deadline->format('Y-m-d H:i:s'), IL_CAL_DATETIME) : null);
257  return $gui->render();
258  }
const IL_CAL_DATETIME
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getManualStatusSelect()

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

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

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

Referenced by fillRow().

211  : string
212  {
213  $parent = $this->getParentObject();
214  $options = [
215  $parent::MANUAL_STATUS_NONE => '-',
216  ilPRGProgress::STATUS_IN_PROGRESS => $this->lng->txt("prg_status_in_progress"),
217  ilPRGProgress::STATUS_ACCREDITED => $this->lng->txt("prg_status_accredited"),
218  ilPRGProgress::STATUS_NOT_RELEVANT => $this->lng->txt("prg_status_not_relevant")
219  //COMPLETED/FAILED are not to be set manually.
220  ];
221 
222  $allowed = ilPRGProgress::getAllowedTargetStatusFor($status);
223 
224  $options = array_filter(
225  $options,
226  static function ($o) use ($allowed, $parent): bool {
227  return in_array($o, $allowed) || $o === $parent::MANUAL_STATUS_NONE;
228  },
229  ARRAY_FILTER_USE_KEY
230  );
231 
232  $select = new ilSelectInputGUI("", $parent::POST_VAR_STATUS . "[$progress_id]");
233  $select->setOptions($options);
234  $select->setValue($parent::MANUAL_STATUS_NONE);
235 
236  return $select->render();
237  }
static getAllowedTargetStatusFor(int $status_from)
+ 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 239 of file class.ilStudyProgrammeIndividualPlanTableGUI.php.

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

Referenced by fillRow().

239  : string
240  {
241  if ($status != ilPRGProgress::STATUS_IN_PROGRESS) {
242  return $points_required;
243  }
244 
245  $parent = $this->getParentObject();
246  $input = new ilNumberInputGUI("", $parent::POST_VAR_REQUIRED_POINTS . "[$progress_id]");
247  $input->setValue($points_required);
248  $input->setSize(5);
249  return $input->render();
250  }
This class represents a number property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSelectableColumns()

ilStudyProgrammeIndividualPlanTableGUI::getSelectableColumns ( )

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

References $cols, and ILIAS\Repository\lng().

142  : array
143  {
144  $cols = array();
145 
146  $cols[self::SEL_COLUMN_ASSIGNMENT_DATE] = array(
147  "txt" => $this->lng->txt("assignment_date"));
148  $cols[self::SEL_COLUMN_DEADLINE] = array(
149  "txt" => $this->lng->txt("prg_deadline"));
150  $cols[self::SEL_COLUMN_COMPLETION_DATE] = array(
151  "txt" => $this->lng->txt("completion_date"));
152  return $cols;
153  }
$cols
Definition: xhr_table.php:11
+ 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: