23include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
 
   24include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
 
   64                $this->lng->loadLanguageModule(
'ps');
 
   69                $this->tabs_gui = $ilTabs;
 
   71                $this->obj_id = $a_obj_id;
 
   75                $this->ref_id = end($refs);
 
   88                if(!$ilAccess->checkAccess(
'write',
'',$this->ref_id))
 
   93                $cmd = $this->ctrl->getCmd();
 
   95                switch($next_class = $this->ctrl->getNextClass($this))
 
  137                $ilToolbar->addButton(
 
  138                        $this->lng->txt(
'ps_cdf_add_field'),
 
  139                        $this->ctrl->getLinkTarget($this,
'addField')
 
  142                include_once 
'./Services/Membership/classes/class.ilObjectCustomUserFieldsTableGUI.php';
 
  145                $this->tpl->setContent($table->getHTML());
 
  155                foreach($fields as $field_obj)
 
  157                        $field_obj->enableRequired((
bool) isset(
$_POST[
'required'][$field_obj->getId()]));
 
  158                        $field_obj->update();
 
  173                if(!count(
$_POST[
'field_ids']))
 
  179                include_once 
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
 
  181                $confirm->setFormAction($this->ctrl->getFormAction($this));
 
  182                $confirm->setHeaderText($this->lng->txt(
'ps_cdf_delete_sure'));
 
  184                foreach(
$_POST[
'field_ids'] as $field_id)
 
  188                        $confirm->addItem(
'field_ids[]', $field_id, $tmp_field->getName());
 
  191                $confirm->setConfirm($this->lng->txt(
'delete'), 
'deleteFields');
 
  192                $confirm->setCancel($this->lng->txt(
'cancel'), 
'listFields');
 
  193                $this->tpl->setContent($confirm->getHTML());
 
  202                foreach((array) 
$_POST[
'field_ids'] as $field_id)
 
  205                        $tmp_field->delete();
 
  223                $this->form->getItemByPostVar(
'va')->setValues(array(
''));
 
  225                $this->tpl->setContent($this->form->getHTML());
 
  237                if($this->form->checkInput())
 
  240                        $udf->setName($this->form->getInput(
'na'));
 
  241                        $udf->setType($this->form->getInput(
'ty'));
 
  242                        $udf->setValues($udf->prepareValues($this->form->getInput(
'va')));
 
  243                        $udf->setValueOptions($this->form->getItemByPostVar(
'va')->getOpenAnswerIndexes()); 
 
  244                        $udf->enableRequired($this->form->getInput(
're'));
 
  255                $this->form->setValuesByPost();
 
  256                $this->tpl->setContent($this->form->getHTML());
 
  267                if(!$_REQUEST[
'field_id'])
 
  276                $this->form->getItemByPostVar(
'na')->setValue($udf->getName());
 
  277                $this->form->getItemByPostVar(
'ty')->setValue($udf->getType());
 
  278                $this->form->getItemByPostVar(
're')->setChecked($udf->isRequired());
 
  279                $this->form->getItemByPostVar(
'va')->setValues($udf->getValues());
 
  280                $this->form->getItemByPostVar(
'va')->setOpenAnswerIndexes($udf->getValueOptions());
 
  282                $this->tpl->setContent($this->form->getHTML());
 
  295                if($this->form->checkInput())
 
  298                        $udf->setName($this->form->getInput(
'na'));
 
  299                        $udf->setType($this->form->getInput(
'ty'));
 
  300                        $prepared = $udf->prepareValues($this->form->getInput(
'va'));
 
  301                        $udf->setValues($prepared);
 
  302                        $udf->setValueOptions($this->form->getItemByPostVar(
'va')->getOpenAnswerIndexes());
 
  303                        $udf->enableRequired($this->form->getInput(
're'));
 
  314                $this->form->setValuesByPost();
 
  315                $this->tpl->setContent($this->form->getHTML());
 
  329                include_once 
'./Services/Form/classes/class.ilPropertyFormGUI.php';
 
  335                                $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  336                                $this->form->setTitle($this->lng->txt(
'ps_cdf_add_field'));
 
  337                                $this->form->addCommandButton(
'saveField', $this->lng->txt(
'save'));
 
  338                                $this->form->addCommandButton(
'listFields', $this->lng->txt(
'cancel'));
 
  342                                $this->ctrl->setParameter($this,
'field_id',(
int) $_REQUEST[
'field_id']);
 
  343                                $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  344                                $this->form->setTitle($this->lng->txt(
'ps_cdf_edit_field'));
 
  345                                $this->form->addCommandButton(
'updateField', $this->lng->txt(
'save'));
 
  346                                $this->form->addCommandButton(
'listFields', $this->lng->txt(
'cancel'));
 
  353                $na->setMaxLength(255);
 
  354                $na->setRequired(
true);
 
  355                $this->form->addItem($na);
 
  359                $ty->setRequired(
true);
 
  360                $this->form->addItem($ty);
 
  362                if($a_mode == self::MODE_UPDATE)
 
  364                        $ty->setDisabled(
true); 
 
  369                $ty->addOption($ty_te);
 
  373                $ty->addOption($ty_se);
 
  376                include_once 
'./Services/Form/classes/class.ilSelectBuilderInputGUI.php';
 
  378                $ty_se_mu->setAllowMove(
true);
 
  379                $ty_se_mu->setRequired(
true);
 
  380                $ty_se_mu->setSize(32);
 
  381                $ty_se_mu->setMaxLength(128);
 
  382                $ty_se->addSubItem($ty_se_mu);                          
 
  387                $this->form->addItem($re);
 
  396                $GLOBALS[
'ilCtrl']->saveParameter($this,
'member_id');
 
  400                $GLOBALS[
'ilTabs']->setBackTarget($this->lng->txt(
'back'),$this->ctrl->getLinkTarget($this,
'cancelEditMember'));
 
  422                $GLOBALS[
'ilCtrl']->returnToParent($this);
 
  431                include_once 
'./Services/Form/classes/class.ilPropertyFormGUI.php';
 
  433                $form->setFormAction(
$GLOBALS[
'ilCtrl']->getFormAction($this));
 
  436                $title .= (
': '.$name[
'lastname'].
', '.$name[
'firstname']);
 
  439                include_once 
'./Services/Membership/classes/class.ilMemberAgreementGUI.php';
 
  442                $form->addCommandButton(
'saveMember', $this->lng->txt(
'save'));
 
  443                $form->addCommandButton(
'cancelEditMember', $this->lng->txt(
'cancel'));
 
  452                $GLOBALS[
'ilCtrl']->saveParameter($this,
'member_id');
 
  455                if(
$form->checkInput())
 
  458                        include_once 
'./Services/Membership/classes/class.ilObjectCustomUserFieldHistory.php';
 
  461                        $history->setUpdateUser(
$ilUser->getId());
 
  466                        $GLOBALS[
'ilCtrl']->returnToParent($this);
 
  470                $form->setValuesByPost();
 
An exception for terminatinating execution or to throw for unit testing.
Confirmation screen class.
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.
@classDescription Date and time handling
static setCourseDefinedFieldValues(ilPropertyFormGUI $form, $a_obj_id, $a_usr_id=0)
static addCustomFields($form, $a_obj_id, $a_type, $a_mode='user')
Add custom course fields.
static saveCourseDefinedFields(ilPropertyFormGUI $form, $a_obj_id, $a_usr_id=0)
Save course defined fields.
static _hasAgreementsByObjId($a_obj_id)
Check if there is any user agreement.
static _deleteByObjId($a_obj_id)
Delete all entries by obj_id.
static _lookupName($a_user_id)
lookup user name
Editing history for object custom user fields.
updateField()
Update field definition.
saveFields()
Save Field settings (currently only required status)
addField()
Show field creation form.
deleteFields()
Delete selected fields.
editMember(ilPropertyFormGUI $form=null)
Edit Member.
__construct($a_obj_id)
Constructor.
editField()
Edit one field.
listFields()
List existing custom fields.
initFieldForm($a_mode)
Init/create property form for fields.
show()
Show list of custom fields.
getObjId()
Get obj_id of container.
executeCommand()
Execute Command.
initMemberForm()
Init member form.
confirmDeleteFields()
Show delete confirmation screen.
cancelEditMember()
Cancel editing.
@classDescription Table presentation of course/group relevant user data fields
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
This class represents an option in a radio group.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.