public function __construct(ilCtrl $ctrl, ilLanguage $lng, ilAssQuestionSkillAssignmentsGUI $parentGUI)
 {
     $this->ctrl = $ctrl;
     $this->lng = $lng;
     $this->parentGUI = $parentGUI;
     parent::__construct();
 }
Ejemplo n.º 2
0
 function __construct($guiclass)
 {
     parent::__construct();
     global $lng;
     global $ilAccess;
     $this->lng =& $lng;
     $this->guiclass =& $guiclass;
     $this->setFormAction($guiclass->ctrl->getFormAction($this->guiclass));
     $this->setTitle($this->lng->txt('compose'));
     $this->subject = new ilTextInputGUI($this->lng->txt('subject'), 'm_subject');
     $this->subject->setSize(50);
     $this->subject->setRequired(true);
     $this->addItem($this->subject);
     $this->sendtype = new ilRadioGroupInputGUI($this->lng->txt('recipients'), "m_notsent");
     $this->sendtype->addOption(new ilCheckboxOption($this->lng->txt("send_to_all"), 0, ''));
     $this->sendtype->addOption(new ilCheckboxOption($this->lng->txt("not_sent_only"), 1, ''));
     $this->sendtype->addOption(new ilCheckboxOption($this->lng->txt("send_to_unanswered"), 3, ''));
     $this->sendtype->addOption(new ilCheckboxOption($this->lng->txt("send_to_answered"), 2, ''));
     $this->addItem($this->sendtype);
     $existingdata = $this->guiclass->object->getExternalCodeRecipients();
     $existingcolumns = array();
     if (count($existingdata)) {
         $first = array_shift($existingdata);
         foreach ($first as $key => $value) {
             if (strcmp($key, 'code') != 0 && strcmp($key, 'email') != 0 && strcmp($key, 'sent') != 0) {
                 array_push($existingcolumns, '[' . $key . ']');
             }
         }
     }
     global $ilUser;
     $settings = $this->guiclass->object->getUserSettings($ilUser->getId(), 'savemessage');
     if (count($settings)) {
         $options = array(0 => $this->lng->txt('please_select'));
         foreach ($settings as $setting) {
             $options[$setting['settings_id']] = $setting['title'];
         }
         $this->savedmessages = new ilSelectInputGUI($this->lng->txt("saved_messages"), "savedmessage");
         $this->savedmessages->setOptions($options);
         $this->addItem($this->savedmessages);
     }
     $this->mailmessage = new ilTextAreaInputGUI($this->lng->txt('message_content'), 'm_message');
     $this->mailmessage->setRequired(true);
     $this->mailmessage->setCols(80);
     $this->mailmessage->setRows(10);
     $this->mailmessage->setInfo(sprintf($this->lng->txt('message_content_info'), join($existingcolumns, ', ')));
     $this->addItem($this->mailmessage);
     // save message
     $this->savemessage = new ilCheckboxInputGUI('', "savemessage");
     $this->savemessage->setOptionTitle($this->lng->txt("save_reuse_message"));
     $this->savemessage->setValue(1);
     $this->savemessagetitle = new ilTextInputGUI($this->lng->txt('save_reuse_title'), 'savemessagetitle');
     $this->savemessagetitle->setSize(60);
     $this->savemessage->addSubItem($this->savemessagetitle);
     $this->addItem($this->savemessage);
     if (count($settings)) {
         if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
             $this->addCommandButton("deleteSavedMessage", $this->lng->txt("delete_saved_message"));
         }
         if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
             $this->addCommandButton("insertSavedMessage", $this->lng->txt("insert_saved_message"));
         }
     }
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $this->addCommandButton("sendCodesMail", $this->lng->txt("send"));
     }
 }
 /**
  * Constructor
  */
 public function __construct($a_parent_obj, $a_parent_cmd)
 {
     $this->parent_obj = $a_parent_obj;
     $this->parent_cmd = $a_parent_cmd;
     parent::__construct($a_parent_obj, $a_parent_cmd);
 }
 /**
  * Constructor of ilRoomSharingSearchFormGUI. This form is needed to write
  * the inputs of the form inputs into the SESSION, rather than POST.
  *
  * @param    string $a_title   Title
  * @param    string $a_postvar Post Variable
  */
 public function __construct($a_title = "", $a_postvar = "")
 {
     parent::__construct($a_title, $a_postvar);
 }