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"]
98 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
100 foreach($rbacreview->getGlobalRoles() as $role_id)
102 if(!in_array($role_id, array(SYSTEM_ROLE_ID, ANONYMOUS_ROLE_ID)))
104 $role_map[$role_id] = $ilObjDataCache->lookupTitle($role_id);
109 foreach ($codes_data[
"set"] as $k => $code)
119 $result[$k][
"registration_used"] =
"";
124 $result[$k][
"role"] = $this->role_map[$code[
"role"]];
126 $result[$k][
"registration_code"] = $code[
"code"];
127 $result[$k][
"code_id"] = $code[
"code_id"];
140 global
$lng, $rbacreview,
$ilUser, $ilObjDataCache;
142 include_once(
"./Services/Registration/classes/class.ilRegistrationCode.php");
145 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
146 $ti =
new ilTextInputGUI($lng->txt(
"registration_code"),
"query");
149 $ti->setSubmitFormOnEnter(
true);
151 $ti->readFromSession();
152 $this->filter[
"code"] = $ti->getValue();
156 $this->role_map = array();
157 foreach($rbacreview->getGlobalRoles() as $role_id)
159 if(!in_array($role_id, array(SYSTEM_ROLE_ID, ANONYMOUS_ROLE_ID)))
161 $this->role_map[$role_id] = $ilObjDataCache->lookupTitle($role_id);
165 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
166 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
167 $options = array(
"" => $this->lng->txt(
"registration_roles_all"))+
172 $si->readFromSession();
173 $this->filter[
"role"] = $si->getValue();
176 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
177 $options = array(
"" => $this->lng->txt(
"registration_generated_all"));
182 $si =
new ilSelectInputGUI($this->lng->txt(
"registration_generated"),
"generated");
185 $si->readFromSession();
186 $this->filter[
"generated"] = $si->getValue();
191 return array(
"registration_code",
"role",
"registration_generated",
"registration_used");
199 $this->tpl->setVariable(
"ID", $code[
"code_id"]);
202 $this->tpl->setVariable(
"VAL_".strtoupper($c), $code[$c]);