/**
  * @param ilUDFCheckGUI $parent_obj
  * @param string        $parent_cmd
  * @param string        $template_context
  */
 public function __construct(ilUDFCheckGUI $parent_obj, $parent_cmd = ilUDFCheckGUI::CMD_INDEX, $template_context = "")
 {
     /**
      * @var              $ilCtrl ilCtrl
      * @var ilToolbarGUI $ilToolbar
      */
     global $ilCtrl, $ilToolbar;
     $this->ctrl = $ilCtrl;
     $this->pl = ilUserDefaultsPlugin::getInstance();
     $this->toolbar = $ilToolbar;
     $this->setPrefix(self::USR_DEF_CONTENT);
     $this->setFormName(self::USR_DEF_CONTENT);
     $this->setId(self::USR_DEF_CONTENT);
     $this->setTitle($this->pl->txt('check_table_title'));
     parent::__construct($parent_obj, $parent_cmd, $template_context);
     $this->ctrl->saveParameter($parent_obj, $this->getNavParameter());
     $this->setEnableNumInfo(true);
     $this->setFormAction($this->ctrl->getFormAction($parent_obj));
     $this->addColumns();
     $this->setDefaultOrderField('title');
     $this->setExternalSorting(true);
     $this->setExternalSegmentation(true);
     $this->setRowTemplate('Customizing/global/plugins/Services/EventHandling/EventHook/UserDefaults/templates/default/tpl.settings_row.html');
     $this->parseData();
     $this->toolbar->addButton($this->pl->txt('check_back'), $this->ctrl->getLinkTargetByClass('ilUserSettingsGUI', ilUserSettingsGUI::CMD_INDEX));
     $this->toolbar->addButton($this->pl->txt('check_add'), $this->ctrl->getLinkTarget($parent_obj, ilUDFCheckGUI::CMD_ADD), '', '', '', '', 'submit emphsubmit');
 }
 /**
  * @return ilUserDefaultsPlugin
  */
 public static function getInstance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
 protected function parseData()
 {
     $this->determineOffsetAndOrder();
     $this->determineLimit();
     $xdglRequestList = ilUserSetting::getCollection();
     $xdglRequestList->orderBy($this->getOrderField(), $this->getOrderDirection());
     $xdglRequestList->innerjoin('object_data', 'global_role', 'obj_id', array('title'));
     foreach ($this->filter as $field => $value) {
         if ($value) {
             $xdglRequestList->where(array($field => $value));
         }
     }
     $this->setMaxCount($xdglRequestList->count());
     if (!$xdglRequestList->hasSets()) {
         //			ilUtil::sendInfo('Keine Ergebnisse für diesen Filter');
     }
     $xdglRequestList->limit($this->getOffset(), $this->getOffset() + $this->getLimit());
     $xdglRequestList->orderBy('title');
     $a_data = $xdglRequestList->getArray();
     if (ilUserDefaultsPlugin::is50()) {
         $img_on = ilUtil::img(ilUtil::getImagePath('icon_ok.svg'));
         $img_off = ilUtil::img(ilUtil::getImagePath('icon_not_ok.svg'));
     } else {
         $img_on = ilUtil::img(ilUtil::getImagePath('icon_led_on_s.png'));
         $img_off = ilUtil::img(ilUtil::getImagePath('icon_led_off_s.png'));
     }
     foreach ($a_data as $k => $d) {
         $a_data[$k]['status_image'] = $d['status'] == ilUserSetting::STATUS_ACTIVE ? $img_on : $img_off;
     }
     $this->setData($a_data);
 }
 /**
  * @param ilUDFCheckGUI $parent_gui
  * @param ilUDFCheck    $ilUDFCheck
  */
 public function __construct(ilUDFCheckGUI $parent_gui, ilUDFCheck $ilUDFCheck)
 {
     global $ilCtrl;
     $this->parent_gui = $parent_gui;
     $this->object = $ilUDFCheck;
     $this->is_new = $ilUDFCheck->getId() == 0;
     $this->ctrl = $ilCtrl;
     $this->pl = ilUserDefaultsPlugin::getInstance();
     $this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
     $this->initForm();
 }
 /**
  * @param ilUserSettingsGUI $parent_gui
  * @param ilUserSetting     $ilUserSetting
  */
 public function __construct(ilUserSettingsGUI $parent_gui, ilUserSetting $ilUserSetting)
 {
     global $ilCtrl, $lng, $styleDefinition;
     $this->lng = $lng;
     $this->parent_gui = $parent_gui;
     $this->object = $ilUserSetting;
     $this->ctrl = $ilCtrl;
     $this->pl = ilUserDefaultsPlugin::getInstance();
     //		$this->pl->updateLanguageFiles();
     $this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
     $this->initForm();
 }
Ejemplo n.º 6
0
 /**
  * @param $parent_gui
  */
 public function __construct($parent_gui)
 {
     global $ilCtrl, $tpl;
     /**
      * @var $ilCtrl ilCtrl
      */
     $this->ctrl = $ilCtrl;
     $this->tpl = $tpl;
     $this->pl = ilUserDefaultsPlugin::getInstance();
     $this->ctrl->saveParameter($this, self::IDENTIFIER);
     $this->ctrl->setParameter($this, ilUserSettingsGUI::IDENTIFIER, $_GET[ilUserSettingsGUI::IDENTIFIER]);
     $this->ctrl->saveParameter($parent_gui, ilUserSettingsGUI::IDENTIFIER);
 }
 /**
  * @param string $title
  * @param string $post_var
  */
 public function __construct($title, $post_var)
 {
     global $tpl, $ilUser, $lng;
     if (substr($post_var, -2) != '[]') {
         $post_var = $post_var . '[]';
     }
     parent::__construct($title, $post_var);
     $this->lng = $lng;
     $this->pl = ilUserDefaultsPlugin::getInstance();
     $tpl->addJavaScript('./Customizing/global/plugins/Services/EventHandling/EventHook/UserDefaults/lib/select2/select2.min.js');
     $tpl->addJavaScript('./Customizing/global/plugins/Services/EventHandling/EventHook/UserDefaults/lib/select2/select2_locale_' . $ilUser->getCurrentLanguage() . '.js');
     $tpl->addCss('./Customizing/global/plugins/Services/EventHandling/EventHook/UserDefaults/lib/select2/select2.css');
     $this->setInputTemplate($this->pl->getTemplate('tpl.multiple_select.html'));
     $this->setWidth('300px');
 }
Ejemplo n.º 8
0
 /**
  * @param ilObjUser $ilObjUser
  */
 public function doAssignements(ilObjUser $ilObjUser)
 {
     $this->setUsrObject($ilObjUser);
     if ($this->isValid()) {
         $this->addSkills();
         $this->generatePortfolio();
         $this->assignCourses();
         $this->assignGroups();
         $this->assignToGlobalRole();
         $this->assignOrgunits();
         $this->assignSkin();
         $this->assignUserStartingPoint();
         if (ilUserDefaultsPlugin::getInstance()->is51()) {
             $this->assignStudyprograms();
         }
     }
 }
 /**
  * @param string $title
  * @param string $post_var
  * @param        $placeholder
  */
 public function __construct($title, $post_var, $placeholder)
 {
     parent::__construct($title, $post_var);
     $this->placeholder = $placeholder;
     $this->pl = ilUserDefaultsPlugin::getInstance();
 }