4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
25 $this->
setId(
"registration_code");
32 $this->
addColumn($this->lng->txt($c), $c);
38 $this->
setFormAction($ilCtrl->getFormAction($this->parent_obj,
"listCodes"));
39 $this->
setRowTemplate(
"tpl.code_list_row.html",
"Services/Registration");
51 $this->
addCommandButton(
"exportCodes", $lng->txt(
"registration_codes_export"));
61 global
$lng, $rbacreview, $ilObjDataCache;
65 include_once(
"./Services/Registration/classes/class.ilRegistrationCode.php");
68 "registration_code" =>
"code",
70 "registration_generated" =>
"generated",
71 "registration_used" =>
"used"
79 $this->filter[
"code"],
80 $this->filter[
"role"],
81 $this->filter[
"generated"]
84 if (count($codes_data[
"set"]) == 0 && $this->
getOffset() > 0)
92 $this->filter[
"code"],
93 $this->filter[
"role"],
94 $this->filter[
"generated"]
99 foreach ($codes_data[
"set"] as $k => $code)
109 $result[$k][
"registration_used"] =
"";
114 $result[$k][
"role"] = $this->role_map[$code[
"role"]];
116 $result[$k][
"registration_code"] = $code[
"code"];
117 $result[$k][
"code_id"] = $code[
"code_id"];
130 global
$lng, $rbacreview, $ilUser, $ilObjDataCache;
132 include_once(
"./Services/Registration/classes/class.ilRegistrationCode.php");
135 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
136 $ti =
new ilTextInputGUI($lng->txt(
"registration_code"),
"query");
139 $ti->setSubmitFormOnEnter(
true);
141 $ti->readFromSession();
142 $this->filter[
"code"] = $ti->getValue();
146 $this->role_map = array();
147 foreach($rbacreview->getGlobalRoles() as $role_id)
149 if(!in_array($role_id, array(SYSTEM_ROLE_ID, ANONYMOUS_ROLE_ID)))
151 $this->role_map[$role_id] = $ilObjDataCache->lookupTitle($role_id);
155 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
156 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
157 $options = array(
"" => $this->lng->txt(
"registration_roles_all"))+
162 $si->readFromSession();
163 $this->filter[
"role"] = $si->getValue();
166 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
167 $options = array(
"" => $this->lng->txt(
"registration_generated_all"));
172 $si =
new ilSelectInputGUI($this->lng->txt(
"registration_generated"),
"generated");
175 $si->readFromSession();
176 $this->filter[
"generated"] = $si->getValue();
181 return array(
"registration_code",
"role",
"registration_generated",
"registration_used");
189 $this->tpl->setVariable(
"ID", $code[
"code_id"]);
192 $this->tpl->setVariable(
"VAL_".strtoupper($c), $code[$c]);