4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
27 $this->
setId(
"user_account_code");
29 parent::__construct($a_parent_obj, $a_parent_cmd);
33 $this->
addColumn(
$lng->txt(
"user_account_code_valid_until"),
"valid_until");
34 $this->
addColumn(
$lng->txt(
"user_account_code_generated"),
"generated");
35 $this->
addColumn(
$lng->txt(
"user_account_code_used"),
"used");
53 include_once
"Services/UIComponent/Button/classes/class.ilSubmitButton.php";
55 $button->setCaption(
"user_account_codes_export");
56 $button->setCommand(
"exportCodes");
57 $button->setOmitPreventDoubleSubmission(
true);
71 $rbacreview = $DIC[
'rbacreview'];
72 $ilObjDataCache = $DIC[
'ilObjDataCache'];
76 include_once(
"./Services/User/classes/class.ilAccountCode.php");
83 $this->filter[
"code"],
84 $this->filter[
"valid_until"],
85 $this->filter[
"generated"]
88 if (count($codes_data[
"set"]) == 0 && $this->
getOffset() > 0) {
95 $this->filter[
"code"],
96 $this->filter[
"valid_until"],
97 $this->filter[
"generated"]
102 foreach ($codes_data[
"set"] as $k =>
$code) {
111 if (
$code[
"valid_until"] ===
"0") {
112 $valid =
$lng->txt(
"user_account_code_valid_until_unlimited");
113 } elseif (is_numeric(
$code[
"valid_until"])) {
137 $rbacreview = $DIC[
'rbacreview'];
140 include_once(
"./Services/User/classes/class.ilAccountCode.php");
143 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
147 $ti->setSubmitFormOnEnter(
true);
149 $ti->readFromSession();
150 $this->filter[
"code"] = $ti->getValue();
153 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
154 $options = array(
"" =>
$lng->txt(
"user_account_code_generated_all"));
161 $si->readFromSession();
162 $this->filter[
"generated"] =
$si->getValue();
170 $this->tpl->setVariable(
"ID",
$code[
"code_id"]);
171 $this->tpl->setVariable(
"VAL_CODE",
$code[
"code"]);
172 $this->tpl->setVariable(
"VAL_VALID_UNTIL",
$code[
"valid_until"]);
173 $this->tpl->setVariable(
"VAL_GENERATED",
$code[
"generated"]);
174 $this->tpl->setVariable(
"VAL_USED",
$code[
"used"]);
setExternalSorting($a_val)
Set external sorting.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
addCommandButtonInstance(ilButtonBase $a_button)
Add Command button instance.
setExternalSegmentation($a_val)
Set external segmentation.
resetOffset($a_in_determination=false)
Reset offset.
static getGenerationDates()
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
TableGUI class for account codes.
getOrderDirection()
Get order direction.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static getCodesData($order_field, $order_direction, $offset, $limit, $filter_code, $filter_valid_until, $filter_generated)
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
getItems()
Get user items.
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
fillRow($code)
Fill table row.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
addMultiCommand($a_cmd, $a_text)
Add Command button.
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
setRowTemplate($a_template, $a_template_dir="")
Set row template.
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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.
setEnableHeader($a_enableheader)
Set Enable Header.
setMaxCount($a_max_count)
set max.
setEnableTitle($a_enabletitle)
Set Enable Title.
setFilterCommand($a_val, $a_caption=null)
Set filter command.