4require_once 
'Modules/TestQuestionPool/classes/class.ilUnitConfigurationGUI.php';
 
   18        return 'showLocalUnitCategories';
 
   27            return 'showLocalUnitCategories';
 
   29            return 'showGlobalUnitCategories';
 
   38        if (!isset(
$_GET[self::REQUEST_PARAM_SUB_CONTEXT_ID]) || 
$_GET[self::REQUEST_PARAM_SUB_CONTEXT_ID] == $this->repository->getConsumerId()) {
 
   50        $id = $this->repository->getConsumerId();
 
   71        $this->ctrl->saveParameter($this, self::REQUEST_PARAM_SUB_CONTEXT_ID);
 
   73        $ilHelp->setScreenIdComponent(
'qpl');
 
   74        parent::executeCommand();
 
   87        $this->ctrl->setParameter($this, self::REQUEST_PARAM_SUB_CONTEXT_ID, $this->repository->getConsumerId());
 
   88        $ilTabs->addSubTab(
'view_unit_ctx_local', $this->lng->txt(
'un_local_units'), $this->ctrl->getLinkTarget($this, 
'showLocalUnitCategories'));
 
   89        $this->ctrl->setParameter($this, self::REQUEST_PARAM_SUB_CONTEXT_ID, 0);
 
   90        $ilTabs->addSubTab(
'view_unit_ctx_global', $this->lng->txt(
'un_global_units'), $this->ctrl->getLinkTarget($this, 
'showGlobalUnitCategories'));
 
   91        $this->ctrl->setParameter($this, self::REQUEST_PARAM_SUB_CONTEXT_ID, 
'');
 
   94            $ilTabs->activateSubTab(
'view_unit_ctx_local');
 
   96            $ilTabs->activateSubTab(
'view_unit_ctx_global');
 
  103    protected function showLocalUnitCategories()
 
  110        $ilToolbar->addButton($this->lng->txt(
'un_add_category'), $this->ctrl->getLinkTarget($this, 
'showUnitCategoryCreationForm'));
 
  113        $categories = array_filter(
 
  114            $this->repository->getAllUnitCategories(),
 
  116                return $category->
getQuestionFi() == $repo->getConsumerId() ? 
true : 
false;
 
  120        foreach ($categories as $category) {
 
  125                'category_id' => $category->getId(),
 
  126                'category'    => $category->getDisplayString()
 
  138        require_once 
'Modules/TestQuestionPool/classes/tables/class.ilLocalUnitCategoryTableGUI.php';
 
  140        $table->setData($categories);
 
  142        $this->tpl->setContent(
$table->getHTML());
 
  150        if (!isset(
$_GET[
'category_id'])) {
 
  151            $this->showGlobalUnitCategories();
 
  154        $_POST[
'category_ids'] = array(
$_GET[
'category_id']);
 
  164        if (!isset(
$_POST[
'category_ids']) || !is_array(
$_POST[
'category_ids'])) {
 
  165            $this->showGlobalUnitCategories();
 
  183        if (!isset(
$_POST[
'category_ids']) || !is_array(
$_POST[
'category_ids'])) {
 
  184            $this->showGlobalUnitCategories();
 
  189        foreach (
$_POST[
'category_ids'] as $category_id) {
 
  191                $category = $this->repository->getUnitCategoryById((
int) $category_id);
 
  197            $new_cat_id = $this->repository->copyCategory($category->
getId(), $this->repository->getConsumerId());
 
  200            $this->repository->copyUnitsByCategories($category->
getId(), $new_cat_id, $this->repository->getConsumerId());
 
  208        $this->ctrl->setParameter($this, 
'question_fi', 0);
 
  209        $this->ctrl->redirect($this, 
'showLocalUnitCategories');
 
An exception for terminatinating execution or to throw for unit testing.
Base class for ILIAS Exception handling.
Class ilLocalUnitCategoryTableGUI.
Class ilLocalUnitConfigurationGUI.
confirmImportGlobalCategories()
confirmImportGlobalCategory()
getUnitCategoryOverviewCommand()
showUnitCategories(array $categories)
const REQUEST_PARAM_SUB_CONTEXT_ID
Class ilUnitConfigurationGUI @abstract.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
if(!array_key_exists('StateId', $_REQUEST)) $id
if(empty($password)) $table