/** * Set list attributes from post values */ public function initFromForm() { $form = $this->initForm(); if ($form->checkInput()) { foreach (array_keys($this->presets) as $id) { $this->presets[$id][1] = false; } foreach ($form->getInput('preset') as $value) { if (isset($this->presets[$value])) { $this->presets[$value][1] = true; } else { $this->addPreset($value, $value, true); } } $this->setTitle($form->getInput('title'), $form->getInput('desc')); $this->setBlankColumns($form->getInput('blank')); $this->showAdmins($form->getInput('show_admins')); $this->showTutors($form->getInput('show_tutors')); $this->showMembers($form->getInput('show_members')); if ($this->id) { $form->setValuesByPost(); include_once "Services/User/classes/class.ilUserFormSettings.php"; $settings = new ilUserFormSettings($this->id); $settings->importFromForm($form); $settings->store(); } } }
/** * Set list attributes from post values */ public function initFromForm() { $form = $this->initForm(); if ($form->checkInput()) { foreach (array_keys($this->presets) as $id) { $this->presets[$id][1] = false; } foreach ($form->getInput('preset') as $value) { if (isset($this->presets[$value])) { $this->presets[$value][1] = true; } else { $this->addPreset($value, $value, true); } } $this->setTitle($form->getInput('title'), $form->getInput('desc')); $this->setBlankColumns($form->getInput('blank')); $roles = array(); foreach (array_keys($this->role_data) as $role_id) { if ($form->getInput('role_' . $role_id)) { $roles[] = $role_id; } } $this->setRoleSelection($roles); // not in sessions if ($this->waiting_list) { $this->include_subscribers = (bool) $form->getInput('subscr'); $this->include_waiting_list = (bool) $form->getInput('wlist'); } if ($this->user_filters) { foreach (array_keys($this->user_filters) as $msub_id) { $this->user_filters[$msub_id][2] = $form->getInput("members_" . $msub_id); } } if ($this->id) { $form->setValuesByPost(); include_once "Services/User/classes/class.ilUserFormSettings.php"; $settings = new ilUserFormSettings($this->id); $settings->deleteValue('desc'); // #11340 $settings->importFromForm($form); $settings->store(); } } }