36 $this->
ctrl = $DIC->ctrl();
37 $this->tpl = $DIC[
"tpl"];
38 $this->
lng = $DIC->language();
40 $this->prompt_settings = $this->user_prompt->data()->getSettings();
45 $next_class = $this->
ctrl->getNextClass($this);
46 $cmd = $this->
ctrl->getCmd(
"show");
48 switch ($next_class) {
50 if (in_array($cmd, array(
"show",
"save"))) {
56 public function show(): void
81 $ti->setInfo($lng->
txt(
"user_profile_info_text_info"));
90 $sec->setTitle($lng->
txt(
'user_prompting_settings'));
99 $lng->
txt(
"user_prompt_incomplete"),
101 $lng->
txt(
"user_prompt_incomplete_info")
103 $radg->addOption($op1);
107 $lng->
txt(
"user_prompt_once_after_login"),
109 $lng->
txt(
"user_prompt_once_after_login_info")
111 $radg->addOption($op2);
117 $ti->setValue($prompt_settings->
getDays());
118 $op2->addSubItem($ti);
122 $lng->
txt(
"user_prompt_repeat"),
124 $lng->
txt(
"user_prompt_repeat_info")
126 $radg->addOption($op3);
132 $ti->setRequired(
true);
134 $ti->setValue($prompt_settings->
getDays());
135 $op3->addSubItem($ti);
137 $form->addItem($radg);
147 $ti->setInfo($lng->
txt(
"user_profile_prompt_text_info"));
154 $form->addCommandButton(
"save", $lng->
txt(
"save"));
156 $form->setTitle($lng->
txt(
"user_profile_info_std"));
169 if ($form->checkInput()) {
171 ? $form->getInput(
"days_after_login")
172 : $form->getInput(
"days_repeat");
173 $info_text = $prompt_text = [];
175 $info_text[$l] = $form->getInput(
"user_profile_info_text_" . $l);
176 $prompt_text[$l] = $form->getInput(
"user_profile_prompt_text_" . $l);
178 $this->user_prompt->data()->saveSettings($this->user_prompt->settings(
179 (
int) $form->getInput(
"prompt_mode"),
190 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_obj_modified"),
true);
193 $form->setValuesByPost();
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getPromptText(string $lang)
loadLanguageModule(string $a_module)
Load language module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilUserProfilePromptService $user_prompt
setContent(string $a_html)
Sets content for standard template.
const MODE_INCOMPLETE_ONLY
getInstalledLanguages()
Get installed languages.
const MODE_ONCE_AFTER_LOGIN
ilGlobalTemplateInterface $tpl
getInfoText(string $lang)
This class represents a text area property in a property form.
ilProfilePromptSettings $prompt_settings
getFormAction(object $a_gui_obj, string $a_fallback_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)