4include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
 
   25        $ilCtrl = 
$DIC->ctrl();
 
   27        $access = 
$DIC->access();
 
   29        $this->
setId(
"registration_code");
 
   35            if (
$c == 
"role_local" || 
$c == 
"alimit") {
 
   44        $this->
setFormAction($ilCtrl->getFormAction($this->parent_obj, 
"listCodes"));
 
   45        $this->
setRowTemplate(
"tpl.code_list_row.html", 
"Services/Registration");
 
   56        if($access->checkAccess(
"write", 
'', $a_parent_obj->ref_id)) {
 
   72        $rbacreview = 
$DIC[
'rbacreview'];
 
   73        $ilObjDataCache = 
$DIC[
'ilObjDataCache'];
 
   77        include_once(
"./Services/Registration/classes/class.ilRegistrationCode.php");
 
   91            $this->
filter[
"generated"],
 
   95        if (count($codes_data[
"set"]) == 0 && $this->
getOffset() > 0) {
 
  104                $this->
filter[
"generated"],
 
  109        include_once 
'./Services/AccessControl/classes/class.ilObjRole.php';
 
  111        foreach ($rbacreview->getGlobalRoles() as $role_id) {
 
  113                $role_map[$role_id] = $ilObjDataCache->lookupTitle($role_id);
 
  118        foreach ($codes_data[
"set"] as $k => $code) {
 
  119            $result[$k][
"code"] = $code[
"code"];
 
  120            $result[$k][
"code_id"] = $code[
"code_id"];
 
  129                $result[$k][
"role"] = $this->role_map[$code[
"role"]];
 
  132            if ($code[
"role_local"]) {
 
  134                foreach (explode(
";", $code[
"role_local"]) as $role_id) {
 
  140                if (
sizeof($local)) {
 
  142                    $result[$k][
"role_local"] = implode(
"<br />", $local);
 
  146            if ($code[
"alimit"]) {
 
  147                switch ($code[
"alimit"]) {
 
  149                        $result[$k][
"alimit"] = $this->lng->txt(
"reg_access_limitation_none");
 
  153                        $result[$k][
"alimit"] = $this->lng->txt(
"reg_access_limitation_mode_absolute_target") .
 
  158                        $limit_caption = array();
 
  159                        $limit = unserialize($code[
"alimitdt"]);
 
  161                            $limit_caption[] = (int) 
$limit[
"d"] . 
" " . $this->lng->txt(
"days");
 
  164                            $limit_caption[] = (int) 
$limit[
"m"] . 
" " . $this->lng->txt(
"months");
 
  167                            $limit_caption[] = (int) 
$limit[
"y"] . 
" " . $this->lng->txt(
"years");
 
  169                        if (
sizeof($limit_caption)) {
 
  170                            $result[$k][
"alimit"] = $this->lng->txt(
"reg_access_limitation_mode_relative_target") .
 
  171                                ": " . implode(
", ", $limit_caption);
 
  191        $rbacreview = 
$DIC[
'rbacreview'];
 
  193        $ilObjDataCache = 
$DIC[
'ilObjDataCache'];
 
  195        include_once(
"./Services/Registration/classes/class.ilRegistrationCode.php");
 
  198        include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
 
  202        $ti->setSubmitFormOnEnter(
true);
 
  204        $ti->readFromSession();
 
  205        $this->
filter[
"code"] = $ti->getValue();
 
  209        $this->role_map = array();
 
  210        foreach ($rbacreview->getGlobalRoles() as $role_id) {
 
  212                $this->role_map[$role_id] = $ilObjDataCache->lookupTitle($role_id);
 
  216        include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  217        include_once 
'./Services/AccessControl/classes/class.ilObjRole.php';
 
  218        $options = array(
"" => $this->lng->txt(
"registration_roles_all")) +
 
  221        $si->setOptions($options);
 
  223        $si->readFromSession();
 
  227        $options = array(
"" => $this->lng->txt(
"registration_codes_access_limitation_all"),
 
  228            "unlimited" => $this->lng->txt(
"reg_access_limitation_none"),
 
  229            "absolute" => $this->lng->txt(
"reg_access_limitation_mode_absolute"),
 
  230            "relative" => $this->lng->txt(
"reg_access_limitation_mode_relative"));
 
  232        $si->setOptions($options);
 
  234        $si->readFromSession();
 
  235        $this->
filter[
"alimit"] = 
$si->getValue();
 
  238        include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  239        $options = array(
"" => $this->lng->txt(
"registration_generated_all"));
 
  244        $si->setOptions($options);
 
  246        $si->readFromSession();
 
  247        $this->
filter[
"generated"] = 
$si->getValue();
 
  252        return array(
"code" => 
"registration_code",
 
  253            "role" => 
"registration_codes_roles",
 
  254            "role_local" => 
"registration_codes_roles_local",
 
  255            "alimit" => 
"reg_access_limitations",
 
  256            "generated" => 
"registration_generated",
 
  257            "used" => 
"registration_used");
 
  262        $this->tpl->setVariable(
"ID", $code[
"code_id"]);
 
  264            $this->tpl->setVariable(
"VAL_" . strtoupper(
$c), $code[
$c]);
 
An exception for terminatinating execution or to throw for unit testing.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
static _lookupTitle($a_id)
lookup object title
static getGenerationDates()
static getCodesData($order_field, $order_direction, $offset, $limit, $filter_code, $filter_role, $filter_generated, $filter_access_limitation)
TableGUI class for registration codes.
getSelectedColumns()
Get selected columns.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
getItems()
Get user items.
fillRow($code)
Standard Version of Fill Row.
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
setEnableHeader($a_enableheader)
Set Enable Header.
setExternalSorting($a_val)
Set external sorting.
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
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.
setData($a_data)
set table data @access public
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
setEnableTitle($a_enabletitle)
Set Enable Title.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
resetOffset($a_in_determination=false)
Reset offset.
addMultiCommand($a_cmd, $a_text)
Add Command button.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
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.
setExternalSegmentation($a_val)
Set external segmentation.
setOrderField($a_order_field)
set order column
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setFilterCommand($a_val, $a_caption=null)
Set filter command.
getDefaultOrderField()
Get Default order field.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
getOrderDirection()
Get order direction.
setMaxCount($a_max_count)
set max.
This class represents a text property in a property form.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc