5 require_once
"./Services/Object/classes/class.ilObjectGUI.php";
50 $this->ctrl = $DIC->ctrl();
51 $this->tpl = $DIC[
"tpl"];
52 $this->lng = $DIC->language();
54 $this->prompt_settings = $this->user_prompt->data()->getSettings();
63 $next_class = $this->ctrl->getNextClass($this);
64 $cmd = $this->ctrl->getCmd(
"show");
66 switch ($next_class) {
68 if (in_array($cmd, array(
"show",
"save"))) {
95 $lng->loadLanguageModule(
"meta");
97 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
102 foreach (
$lng->getInstalledLanguages() as
$l) {
104 include_once(
"Services/Form/classes/class.ilTextAreaInputGUI.php");
108 $ti->setInfo(
$lng->txt(
"user_profile_info_text_info"));
117 $sec->setTitle(
$lng->txt(
'user_prompting_settings'));
118 $form->addItem($sec);
126 $lng->txt(
"user_prompt_incomplete"),
128 $lng->txt(
"user_prompt_incomplete_info")
130 $radg->addOption($op1);
134 $lng->txt(
"user_prompt_once_after_login"),
136 $lng->txt(
"user_prompt_once_after_login_info")
138 $radg->addOption($op2);
145 $op2->addSubItem($ti);
149 $lng->txt(
"user_prompt_repeat"),
151 $lng->txt(
"user_prompt_repeat_info")
153 $radg->addOption($op3);
160 $op3->addSubItem($ti);
162 $form->addItem($radg);
167 foreach (
$lng->getInstalledLanguages() as
$l) {
169 include_once(
"Services/Form/classes/class.ilTextAreaInputGUI.php");
173 $ti->setInfo(
$lng->txt(
"user_profile_prompt_text_info"));
180 $form->addCommandButton(
"save",
$lng->txt(
"save"));
182 $form->setTitle(
$lng->txt(
"user_profile_info_std"));
183 $form->setFormAction(
$ctrl->getFormAction($this));
198 if (
$form->checkInput()) {
200 ?
$form->getInput(
"days_after_login")
201 :
$form->getInput(
"days_repeat");
202 $info_text = $prompt_text = [];
203 foreach (
$lng->getInstalledLanguages() as
$l) {
204 $info_text[
$l] =
$form->getInput(
"user_profile_info_text_" .
$l);
205 $prompt_text[
$l] =
$form->getInput(
"user_profile_prompt_text_" .
$l);
207 $this->user_prompt->data()->saveSettings($this->user_prompt->settings(
208 $form->getInput(
"prompt_mode"),
219 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
220 $ctrl->redirect($this,
"show");
222 $form->setValuesByPost();
This class represents an option in a radio group.
User profile prompt subservice.
User profile info settings UI class.
if(isset($_POST['submit'])) $form
__construct()
Constructor.
const MODE_INCOMPLETE_ONLY
const MODE_ONCE_AFTER_LOGIN
setRows($a_rows)
Set Rows.
This class represents a text area property in a property form.
executeCommand()
Execute command.