/**
  *	Constructor logic.
  *
  *	This table GUI constructor method initializes the
  *	object and configures the table rendering.
  */
 public function __construct(ilObjectGUI $a_parent_obj, $a_parent_cmd)
 {
     /**
      *	@var ilCtrl $ilCtrl
      */
     global $ilCtrl;
     /* Pre-configure table */
     $this->setId(sprintf('test_overview_test_list_%d', $a_parent_obj->object->getId()));
     $this->setDefaultOrderDirection('ASC');
     $this->setDefaultOrderField('title');
     // ext ordering with db is ok, but ext limiting with db is not possible,
     // since the rbac filtering is downstream to the db query
     $this->setExternalSorting(true);
     $this->setExternalSegmentation(true);
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->setTitle(sprintf($this->lng->txt('rep_robj_xtov_test_list_table_title'), $a_parent_obj->object->getTitle()));
     $plugin = ilPlugin::getPluginObject(IL_COMP_SERVICE, 'Repository', 'robj', 'TestOverview');
     $this->setRowTemplate('tpl.simple_object_row.html', $plugin->getDirectory());
     $this->addColumn($this->lng->txt(''), '', '1px', true);
     $this->addColumn($this->lng->txt('rep_robj_xtov_test_list_hdr_test_title'), 'title');
     $this->addColumn($this->lng->txt('rep_robj_xtov_test_list_hdr_test_info'), '');
     $this->setDescription($this->lng->txt('rep_robj_xtov_test_list_description'));
     $this->setFormAction($ilCtrl->getFormAction($this->getParentObject(), 'updateSettings'));
     $this->addCommandButton('initSelectTests', $this->lng->txt('rep_robj_xtov_add_tsts_to_overview'));
     $this->addMultiCommand('removeTests', $this->lng->txt('rep_robj_xtov_remove_from_overview'));
     $this->setShowRowsSelector(true);
     $this->setSelectAllCheckbox('test_ids[]');
     $this->initFilter();
     $this->setFilterCommand('applyTestsFilter');
     $this->setResetCommand('resetTestsFilter');
 }
 /**
  *	Constructor logic.
  *
  *	This table GUI constructor method initializes the
  *	object and configures the table rendering.
  */
 public function __construct(ilObjectGUI $a_parent_obj, $a_parent_cmd)
 {
     /**
      *	@var ilCtrl	$ilCtrl
      */
     global $ilCtrl;
     /* Pre-configure table */
     $this->setId(sprintf("test_overview_membership_list_%d", $a_parent_obj->object->getId()));
     $this->setDefaultOrderDirection('ASC');
     $this->setDefaultOrderField('title');
     $this->setExternalSorting(true);
     $this->setExternalSegmentation(true);
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->setTitle(sprintf($this->lng->txt('rep_robj_xtov_membership_list_table_title'), $a_parent_obj->object->getTitle()));
     $plugin = ilPlugin::getPluginObject(IL_COMP_SERVICE, 'Repository', 'robj', 'TestOverview');
     $this->setRowTemplate('tpl.simple_object_row.html', $plugin->getDirectory());
     $this->addColumn($this->lng->txt(""), '', '1px', true);
     $this->addColumn($this->lng->txt("rep_robj_xtov_membership_list_hdr_membership_title"), 'title');
     $this->addColumn($this->lng->txt("rep_robj_xtov_membership_list_hdr_membership_info"), '');
     $this->addColumn($this->lng->txt("rep_robj_xtov_item_chosen"), '');
     $this->setDescription($this->lng->txt("rep_robj_xtov_membership_list_description"));
     $this->setFormAction($ilCtrl->getFormAction($this->getParentObject(), 'updateSettings'));
     $this->addMultiCommand('addMemberships', $this->lng->txt('rep_robj_xtov_add_to_overview'));
     $this->addMultiCommand('removeMemberships', $this->lng->txt('rep_robj_xtov_remove_from_overview'));
     $this->setShowRowsSelector(true);
     /* Add 'Select All', configure filters */
     $this->setSelectAllCheckbox('membership_ids[]');
     $this->initFilter();
     $this->setFilterCommand("applyGroupsFilter");
     $this->setResetCommand("resetGroupsFilter");
 }
 /**
  *	Constructor logic.
  *
  *	This table GUI constructor method initializes the
  *	object and configures the table rendering.
  */
 public function __construct(ilObjectGUI $a_parent_obj, $a_parent_cmd)
 {
     /**
      *	@var ilCtrl	$ilCtrl
      */
     global $ilCtrl, $tpl, $ilAccess;
     /* Pre-configure table */
     $this->setId(sprintf("test_overview_%d", $a_parent_obj->object->getId()));
     $this->setDefaultOrderDirection('ASC');
     $this->setDefaultOrderField('obj_id');
     // ext ordering with db is ok, but ext limiting with db is not possible,
     // since the rbac filtering is downstream to the db query
     $this->setExternalSorting(true);
     $this->setExternalSegmentation(false);
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->setTitle(sprintf($this->lng->txt('rep_robj_xtov_test_overview_table_title'), $a_parent_obj->object->getTitle()));
     $overview = $this->getParentObject()->object;
     $this->addColumn($this->lng->txt('rep_robj_xtov_test_overview_hdr_user'));
     foreach ($overview->getUniqueTests() as $obj_id => $refs) {
         $this->accessIndex[$obj_id] = false;
         $valid_ref_id = null;
         foreach ($refs as $ref_id) {
             switch (true) {
                 case $ilAccess->checkAccess("tst_statistics", "", $ref_id):
                 case $ilAccess->checkAccess("write", "", $ref_id):
                     $valid_ref_id = $ref_id;
                     $this->accessIndex[$obj_id] = $valid_ref_id;
                     break 2;
             }
         }
         $ilCtrl->setParameterByClass("ilobjtestgui", 'ref_id', $valid_ref_id);
         $this->addTestColumn($overview->getTest($obj_id)->getTitle(), $ilCtrl->getLinkTargetByClass('ilobjtestgui', 'infoScreen'));
         $ilCtrl->setParameterByClass("ilobjtestgui", 'ref_id', '');
     }
     $this->addColumn($this->lng->txt('rep_robj_xtov_test_overview_hdr_avg'));
     //$this->addColumn($this->lng->txt('rep_robj_xtov_test_overview_hdr_addmark'));
     $this->addColumn($this->lng->txt('Sozialkompetenz'));
     $this->addColumn($this->lng->txt('Fachkompetenz'));
     $this->addColumn($this->lng->txt('Anwesend'));
     $plugin = ilPlugin::getPluginObject(IL_COMP_SERVICE, 'Repository', 'robj', 'TestOverview');
     $this->setRowTemplate('tpl.test_overview_row.html', $plugin->getDirectory());
     $this->setDescription($this->lng->txt("rep_robj_xtov_test_overview_description"));
     $this->addCommandButton('submitManualScores', 'Speichern');
     $cssFile = $plugin->getDirectory() . "/templates/css/testoverview.css";
     $tpl->addCss($cssFile);
     /* Configure table filter */
     $this->initFilter();
     $this->setFilterCommand("applyOverviewFilter");
     $this->setResetCommand("resetOverviewFilter");
     $this->setFormAction($ilCtrl->getFormAction($this->getParentObject(), 'showContent'));
 }