private function showCmd()
 {
     $selectedSkillProfile = ilTestSkillEvaluationToolbarGUI::fetchSkillProfileParam($_POST);
     $testSession = $this->testSessionFactory->getSession();
     $this->skillEvaluation->init()->evaluate($testSession->getActiveId(), $testSession->getLastFinishedPass(), $testSession->getUserId());
     $evaluationToolbarGUI = $this->buildEvaluationToolbarGUI($testSession->getUserId(), $selectedSkillProfile);
     $personalSkillsGUI = $this->buildPersonalSkillsGUI($testSession->getUserId(), $selectedSkillProfile);
     $this->tpl->setContent($this->ctrl->getHTML($evaluationToolbarGUI) . $this->ctrl->getHTML($personalSkillsGUI));
 }
 private function showSkillThresholdsCmd()
 {
     $table = $this->buildTableGUI();
     $skillLevelThresholdList = $this->buildSkillLevelThresholdList();
     $skillLevelThresholdList->loadFromDb();
     $table->setSkillLevelThresholdList($skillLevelThresholdList);
     $assignmentList = $this->buildSkillQuestionAssignmentList();
     $assignmentList->loadFromDb();
     $table->setData($assignmentList->getUniqueAssignedSkills());
     $this->tpl->setContent($this->ctrl->getHTML($table));
 }
 /**
  * Save config
  */
 public function save()
 {
     $form = new ilCertificateConfigFormGUI($this);
     if ($form->saveObject()) {
         ilUtil::sendSuccess($this->pl->txt('msg_save_config'), true);
         $this->ctrl->redirect($this, 'configure');
     } else {
         $form->setValuesByPost();
         $this->tpl->setContent($form->getHTML());
     }
 }
 public function startImport()
 {
     $form = $this->initForm("startImport");
     if (!$form->checkInput()) {
         $this->tpl->setContent($form->getHTML());
     } else {
         $file = $form->getInput("import_file");
         $importer = new ilOrgUnitSimpleImport();
         try {
             $file_path = $file["tmp_name"];
             $file_type = pathinfo($file["name"], PATHINFO_EXTENSION);
             $file_name = pathinfo($file["name"], PATHINFO_FILENAME);
             if ($file_type == "zip") {
                 $extract_path = $file_path . '_extracted/';
                 $extracted_file = $extract_path . $file_name . '/manifest.xml';
                 $zip = new ZipArchive();
                 $res = $zip->open($file_path);
                 if ($res === true) {
                     $zip->extractTo($extract_path);
                     $zip->close();
                     if (file_exists($extracted_file)) {
                         $file_path = $extracted_file;
                     }
                 }
             }
             $importer->simpleImport($file_path);
         } catch (Exception $e) {
             $this->ilLog->write($e->getMessage() . " - " . $e->getTraceAsString());
             ilUtil::sendFailure($this->lng->txt("import_failed"), true);
             $this->ctrl->redirect($this, "render");
         }
         $this->displayImportResults($importer);
     }
 }
 /**
  * list fields
  */
 public function listFields()
 {
     // Show tables
     require_once "./Modules/DataCollection/classes/class.ilDataCollectionTable.php";
     $tables = $this->parent_obj->object->getTables();
     foreach ($tables as $table) {
         $options[$table->getId()] = $table->getTitle();
     }
     include_once './Services/Form/classes/class.ilSelectInputGUI.php';
     $table_selection = new ilSelectInputGUI('', 'table_id');
     $table_selection->setOptions($options);
     $table_selection->setValue($this->table_id);
     $this->toolbar->setFormAction($this->ctrl->getFormActionByClass("ilDataCollectionFieldListGUI", "doTableSwitch"));
     $this->toolbar->addText($this->lng->txt("dcl_table"));
     $this->toolbar->addInputItem($table_selection);
     $this->toolbar->addFormButton($this->lng->txt('change'), 'doTableSwitch');
     $this->toolbar->addSeparator();
     $this->toolbar->addButton($this->lng->txt("dcl_add_new_table"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "create"));
     $this->toolbar->addSeparator();
     $this->ctrl->setParameterByClass("ildatacollectiontableeditgui", "table_id", $this->table_id);
     $this->toolbar->addButton($this->lng->txt("dcl_table_settings"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "edit"));
     $this->toolbar->addButton($this->lng->txt("dcl_delete_table"), $this->ctrl->getLinkTargetByClass("ildatacollectiontableeditgui", "confirmDelete"));
     $this->toolbar->addButton($this->lng->txt("dcl_add_new_field"), $this->ctrl->getLinkTargetByClass("ildatacollectionfieldeditgui", "create"));
     // requested not to implement this way...
     //        $tpl->addJavaScript("Modules/DataCollection/js/fastTableSwitcher.js");
     require_once './Modules/DataCollection/classes/class.ilDataCollectionFieldListTableGUI.php';
     $list = new ilDataCollectionFieldListTableGUI($this, $this->ctrl->getCmd(), $this->table_id);
     $this->tpl->setContent($list->getHTML());
 }
Exemplo n.º 6
0
 /**
  * Display mark schema
  * @param ilPropertyFormGUI $ects_form
  */
 protected function showMarkSchema(ilPropertyFormGUI $ects_form = null)
 {
     if (!$this->object->canEditMarks()) {
         ilUtil::sendInfo($this->lng->txt('cannot_edit_marks'));
     }
     $this->toolbar->setFormAction($this->ctrl->getFormAction($this, 'showMarkSchema'));
     if ($this->object->canEditMarks()) {
         require_once 'Services/UIComponent/Button/classes/class.ilSubmitButton.php';
         $create_simple_mark_schema_button = ilSubmitButton::getInstance();
         $create_simple_mark_schema_button->setCaption($this->lng->txt('tst_mark_create_simple_mark_schema'), false);
         $create_simple_mark_schema_button->setCommand('addSimpleMarkSchema');
         $this->toolbar->addButtonInstance($create_simple_mark_schema_button);
     }
     require_once 'Modules/Test/classes/tables/class.ilMarkSchemaTableGUI.php';
     $mark_schema_table = new ilMarkSchemaTableGUI($this, 'showMarkSchema', '', $this->object);
     $content_parts = array($mark_schema_table->getHTML());
     if ($this->objectSupportsEctsGrades() && $this->object->canEditEctsGrades()) {
         if (!$ects_form instanceof ilPropertyFormGUI) {
             $ects_form = $this->getEctsForm();
             $this->populateEctsForm($ects_form);
         }
         $content_parts[] = $ects_form->getHTML();
     }
     $this->tpl->setContent(implode('<br />', $content_parts));
 }
 private function showFormCmd(ilPropertyFormGUI $form = null)
 {
     if ($form === null) {
         $form = $this->buildForm();
     }
     $this->tpl->setContent($this->ctrl->getHTML($form));
 }
 public function showAttachments()
 {
     /**
      * @var $ilToolbar ilToolbarGUI
      */
     global $ilToolbar;
     $this->tpl->setTitle($this->lng->txt('mail'));
     require_once 'Services/Form/classes/class.ilFileInputGUI.php';
     $attachment = new ilFileInputGUI($this->lng->txt('upload'), 'userfile');
     $attachment->setRequired(true);
     $attachment->setSize(20);
     $ilToolbar->setFormAction($this->ctrl->getFormAction($this, 'uploadFile'), true);
     $ilToolbar->addInputItem($attachment);
     $ilToolbar->addFormButton($this->lng->txt('upload'), 'uploadFile');
     require_once 'Services/Mail/classes/class.ilMailAttachmentTableGUI.php';
     $table = new ilMailAttachmentTableGUI($this, 'showAttachments');
     $mailData = $this->umail->getSavedData();
     $files = $this->mfile->getUserFilesData();
     $data = array();
     $counter = 0;
     foreach ($files as $file) {
         $checked = false;
         if (is_array($mailData['attachments']) && in_array($file['name'], $mailData['attachments'])) {
             $checked = true;
         }
         $data[$counter] = array('checked' => $checked, 'filename' => $file['name'], 'filesize' => (int) $file['size'], 'filecreatedate' => (int) $file['ctime']);
         ++$counter;
     }
     $table->setData($data);
     $this->tpl->setContent($table->getHtml());
     $this->tpl->show();
 }
Exemplo n.º 9
0
 public function confirmDelete()
 {
     $conf = new ilConfirmationGUI();
     $conf->setFormAction($this->ctrl->getFormAction($this));
     $conf->setHeaderText($this->pl->txt('msg_confirm_delete'));
     $conf->setConfirm($this->pl->txt('check_delete'), self::CMD_DELETE);
     $conf->setCancel($this->pl->txt('check_cancel'), self::CMD_INDEX);
     $this->tpl->setContent($conf->getHTML());
 }
 private function showConfirmation(ilPropertyFormGUI $form)
 {
     require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
     $confirmation = new ilConfirmationGUI();
     $confirmation->setHeaderText($this->lng->txt('tst_trigger_result_refreshing'));
     $confirmation->setFormAction($this->ctrl->getFormAction($this));
     $confirmation->setCancel($this->lng->txt('cancel'), self::CMD_SHOW_FORM);
     $confirmation->setConfirm($this->lng->txt('confirm'), self::CMD_CONFIRMED_SAVE_FORM);
     foreach ($form->getInputItemsRecursive() as $key => $item) {
         //vd("$key // {$item->getType()} // ".json_encode($_POST[$item->getPostVar()]));
         switch ($item->getType()) {
             case 'section_header':
                 continue;
             case 'datetime':
                 list($date, $time) = explode(' ', $item->getDate()->get(IL_CAL_DATETIME));
                 if ($item->getMode() == ilDateTimeInputGUI::MODE_SELECT) {
                     list($y, $m, $d) = explode('-', $date);
                     $confirmation->addHiddenItem("{$item->getPostVar()}[date][y]", $y);
                     $confirmation->addHiddenItem("{$item->getPostVar()}[date][m]", $m);
                     $confirmation->addHiddenItem("{$item->getPostVar()}[date][d]", $d);
                     if ($item->getShowTime()) {
                         list($h, $m, $s) = explode(':', $time);
                         $confirmation->addHiddenItem("{$item->getPostVar()}[time][h]", $h);
                         $confirmation->addHiddenItem("{$item->getPostVar()}[time][m]", $m);
                         $confirmation->addHiddenItem("{$item->getPostVar()}[time][s]", $s);
                     }
                 } else {
                     $confirmation->addHiddenItem("{$item->getPostVar()}[date]", $date);
                     $confirmation->addHiddenItem("{$item->getPostVar()}[time]", $time);
                 }
                 break;
             case 'duration':
                 $confirmation->addHiddenItem("{$item->getPostVar()}[MM]", (int) $item->getMonths());
                 $confirmation->addHiddenItem("{$item->getPostVar()}[dd]", (int) $item->getDays());
                 $confirmation->addHiddenItem("{$item->getPostVar()}[hh]", (int) $item->getHours());
                 $confirmation->addHiddenItem("{$item->getPostVar()}[mm]", (int) $item->getMinutes());
                 $confirmation->addHiddenItem("{$item->getPostVar()}[ss]", (int) $item->getSeconds());
                 break;
             case 'checkboxgroup':
                 if (is_array($item->getValue())) {
                     foreach ($item->getValue() as $option) {
                         $confirmation->addHiddenItem("{$item->getPostVar()}[]", $option);
                     }
                 }
                 break;
             case 'checkbox':
                 if ($item->getChecked()) {
                     $confirmation->addHiddenItem($item->getPostVar(), 1);
                 }
                 break;
             default:
                 $confirmation->addHiddenItem($item->getPostVar(), $item->getValue());
         }
     }
     $this->tpl->setContent($this->ctrl->getHTML($confirmation));
 }
 private function showSkillQuestionAssignmentsCmd()
 {
     $table = $this->buildTableGUI();
     $assignmentList = $this->buildSkillQuestionAssignmentList();
     $assignmentList->loadFromDb();
     $assignmentList->loadAdditionalSkillData();
     $table->setSkillQuestionAssignmentList($assignmentList);
     $table->setData($this->testOBJ->getTestQuestions());
     $this->tpl->setContent($this->ctrl->getHTML($table));
 }
Exemplo n.º 12
0
 /**
  * Update (save) type
  */
 protected function update()
 {
     $form = new ilOrgUnitTypeFormGUI($this, new ilOrgUnitType((int) $_GET['type_id']));
     if ($form->saveObject()) {
         ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
         $this->ctrl->redirect($this);
     } else {
         $this->tpl->setContent($form->getHTML());
     }
 }
 /**
  * Enable all settings - Confirmation
  */
 private function showResetTemplateConfirmationCmd()
 {
     require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
     $confirmationGUI = new ilConfirmationGUI();
     $confirmationGUI->setFormAction($this->ctrl->getFormAction($this));
     $confirmationGUI->setHeaderText($this->lng->txt("test_confirm_template_reset"));
     $confirmationGUI->setCancel($this->lng->txt('cancel'), self::CMD_SHOW_FORM);
     $confirmationGUI->setConfirm($this->lng->txt('confirm'), self::CMD_CONFIRMED_RESET_TPL);
     $this->tpl->setContent($this->ctrl->getHTML($confirmationGUI));
 }
 /**
  * confirmDelete
  */
 public function confirmDelete()
 {
     include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
     $conf = new ilConfirmationGUI();
     $conf->setFormAction($this->ctrl->getFormAction($this));
     $conf->setHeaderText($this->lng->txt('dcl_confirm_delete_table'));
     $conf->addItem('table', (int) $this->table->getId(), $this->table->getTitle());
     $conf->setConfirm($this->lng->txt('delete'), 'delete');
     $conf->setCancel($this->lng->txt('cancel'), 'cancelDelete');
     $this->tpl->setContent($conf->getHTML());
 }
 /**
  * Display INFO/Warning Screen if the type was changed by user
  *
  */
 public function confirmTypeChange()
 {
     $new_type_id = (int) $_POST['type_id'];
     $conf_gui = new ilConfirmationGUI();
     $conf_gui->setFormAction($this->ctrl->getFormAction($this));
     $conf_gui->setHeaderText($this->pl->txt('confirm_type_change'));
     $conf_gui->addItem('type_id', $new_type_id, $this->pl->txt('confirm_type_change_text'));
     $conf_gui->setConfirm($this->lng->txt('change'), 'updateType');
     $conf_gui->setCancel($this->lng->txt('cancel'), 'showDefinition');
     $this->tpl->setContent($conf_gui->getHTML());
 }
Exemplo n.º 16
0
 public function showMoveIntoObjectTreeObject()
 {
     require_once "./Services/Tree/classes/class.ilTree.php";
     require_once "./Modules/OrgUnit/classes/class.ilOrgUnitExplorerGUI.php";
     $this->ctrl->setCmd('performPaste');
     $ilOrgUnitExplorerGUI = new ilOrgUnitExplorerGUI("orgu_explorer", "ilObjOrgUnitGUI", "showTree", new ilTree(1));
     $ilOrgUnitExplorerGUI->setTypeWhiteList(array("orgu"));
     if (!$ilOrgUnitExplorerGUI->handleCommand()) {
         $this->tpl->setContent($ilOrgUnitExplorerGUI->getHTML());
     }
 }
 /**
  *
  */
 protected function showUnitCategoryModificationForm()
 {
     if (!$this->isCRUDContext()) {
         $this->{$this->getDefaultCommand()}();
         return;
     }
     $category = $this->getCategoryById((int) $_GET['category_id']);
     $this->initUnitCategoryForm($category);
     $this->unit_cat_form->setValuesByArray(array('category_name' => $category->getCategory()));
     $this->tpl->setContent($this->unit_cat_form->getHtml());
 }
 /**
  * Create or update a type
  */
 public function saveType()
 {
     $type = $this->type === NULL ? new srCertificateType() : $this->type;
     $form = new srCertificateTypeFormGUI($this, $type);
     if ($form->saveObject()) {
         ilUtil::sendSuccess($this->pl->txt('msg_type_saved'), true);
         $this->ctrl->setParameter($this, 'type_id', $type->getId());
         $this->ctrl->redirect($this, 'editType');
     } else {
         $this->tpl->setContent($form->getHTML());
     }
 }
 private function showEditSourcePoolDefinitionFormCmd(ilTestRandomQuestionSetPoolDefinitionFormGUI $form = null)
 {
     $this->questionSetConfig->loadFromDb();
     $defId = $this->fetchSingleSourcePoolDefinitionIdParameter();
     $sourcePoolDefinition = $this->sourcePoolDefinitionFactory->getSourcePoolDefinitionByDefinitionId($defId);
     $availableTaxonomyIds = ilObjTaxonomy::getUsageOfObject($sourcePoolDefinition->getPoolId());
     if ($form === null) {
         $form = $this->buildEditSourcePoolDefinitionFormGUI();
         $form->build($sourcePoolDefinition, $availableTaxonomyIds);
     }
     $this->tpl->setContent($this->ctrl->getHTML($form));
 }
 /**
  * @param $message
  */
 protected function sendFailure($message)
 {
     $keep = $this->ctrl->isAsynch() ? false : true;
     $this->form->setValuesByPost();
     if ($this->ctrl->isAsynch()) {
         echo $this->tpl->getMessageHTML($message, 'failure') . $this->form->getHTML();
         exit;
     } else {
         ilUtil::sendFailure($message, $keep);
         $this->tpl->setContent($this->form->getHTML());
     }
 }
 private function showSyncOriginalConfirmationCmd()
 {
     $questionId = (int) $_GET['question_id'];
     require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
     $confirmation = new ilConfirmationGUI();
     $confirmation->setHeaderText($this->lng->txt('qpl_sync_quest_skl_assigns_confirmation'));
     $confirmation->setFormAction($this->ctrl->getFormAction($this));
     $confirmation->addHiddenItem('question_id', $questionId);
     $confirmation->setConfirm($this->lng->txt('yes'), self::CMD_SYNC_ORIGINAL);
     $confirmation->setCancel($this->lng->txt('no'), self::CMD_SHOW_SKILL_QUEST_ASSIGNS);
     $this->tpl->setContent($this->ctrl->getHTML($confirmation));
 }
 /**
  * command method that prints the question set config form
  * 
  * @param ilPropertyFormGUI $form
  */
 public function showFormCmd(ilPropertyFormGUI $form = null)
 {
     $this->questionSetConfig->loadFromDb();
     if ($this->questionSetConfig->areDepenciesBroken($this->tree)) {
         ilUtil::sendFailure($this->questionSetConfig->getDepenciesBrokenMessage($this->lng));
     } elseif ($this->questionSetConfig->areDepenciesInVulnerableState($this->tree)) {
         ilUtil::sendInfo($this->questionSetConfig->getDepenciesInVulnerableStateMessage($this->lng));
     }
     if ($form === null) {
         $form = $this->buildForm();
     }
     $this->tpl->setContent($this->ctrl->getHTML($form));
 }
Exemplo n.º 23
0
 public function update()
 {
     $form = $this->initForm();
     $form->setValuesByPost();
     if ($form->checkInput()) {
         $this->parent_object->setImportId($form->getItemByPostVar("ext_id")->getValue());
         $this->parent_object->update();
         ilUtil::sendSuccess($this->lng->txt("ext_id_updated"), true);
         $this->ctrl->redirect($this, "edit");
     } else {
         $this->tpl->setContent($form->getHTML());
     }
 }
Exemplo n.º 24
0
 public function editTranslations($a_get_post_values = false, $a_add = false)
 {
     $this->lng->loadLanguageModule($this->ilObjectOrgUnit->getType());
     $table = new ilObjectTranslationTableGUI($this, "editTranslations", true, "Translation");
     if ($a_get_post_values) {
         $vals = array();
         foreach ($_POST["title"] as $k => $v) {
             $vals[] = array("title" => $v, "desc" => $_POST["desc"][$k], "lang" => $_POST["lang"][$k], "default" => $_POST["default"] == $k);
         }
         $table->setData($vals);
     } else {
         $data = $this->ilObjectOrgUnit->getTranslations();
         foreach ($data["Fobject"] as $k => $v) {
             $data["Fobject"][$k]["default"] = $k == $data["default_language"];
         }
         if ($a_add) {
             $data["Fobject"][++$k]["title"] = "";
         }
         $table->setData($data["Fobject"]);
     }
     $this->tpl->setContent($table->getHTML());
 }
Exemplo n.º 25
0
 /**
  * @param $ids []
  */
 function deleteMultiple($ids = NULL)
 {
     $delete_gui_class = $this->record_type . "DeleteGUI";
     /**
      * @var arDeleteGUI $delete_gui
      */
     $delete_gui = new $delete_gui_class($this, "delete", new ActiveRecordList($this->ar), "delete", $ids);
     if (count($ids) == 1) {
         ilUtil::sendQuestion($this->getDeleteRecordConfirmationMessage());
     } else {
         ilUtil::sendQuestion($this->getDeleteRecordsConfirmationMessage());
     }
     $this->tpl->setContent($delete_gui->getHTML());
 }
Exemplo n.º 26
0
 public function updateSettings()
 {
     if (!$this->ilAccess->checkAccess("write", "", $this->ref_id)) {
         ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
         $this->ctrl->redirect($this);
     }
     $form = new ilObjOrgUnitSettingsFormGUI($this, $this->object);
     if ($form->saveObject()) {
         ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
         $this->ctrl->redirect($this, 'editSettings');
     } else {
         $this->tpl->setContent($form->getHTML());
     }
 }
Exemplo n.º 27
0
 /**
  *
  */
 public function showModerators()
 {
     /**
      * @var $ilToolbar ilToolbarGUI
      * @var $lng       ilLanguage
      */
     global $ilToolbar, $lng;
     include_once './Services/Search/classes/class.ilRepositorySearchGUI.php';
     ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $ilToolbar, array('auto_complete_name' => $lng->txt('user'), 'submit_name' => $lng->txt('add'), 'add_search' => true, 'add_from_container' => $this->oForumModerators->getRefId()));
     $tbl = new ilTable2GUI($this);
     $tbl->setId('frm_show_mods_tbl_' . (int) $_GET['ref_id']);
     $tbl->setFormAction($this->ctrl->getFormAction($this, 'detachModeratorRole'));
     $tbl->setTitle($this->lng->txt('frm_moderators'));
     $tbl->setRowTemplate('tpl.forum_moderators_table_row.html', 'Modules/Forum');
     $tbl->setDefaultOrderField('login');
     $entries = $this->oForumModerators->getCurrentModerators();
     $num = count($entries);
     if ($num > 1) {
         $tbl->addColumn('', 'check', '1%', true);
         $tbl->setSelectAllCheckbox('usr_id');
         $tbl->addMultiCommand('detachModeratorRole', $this->lng->txt('frm_detach_moderator_role'));
     } else {
         if (!$entries) {
             $tbl->setNoEntriesText($this->lng->txt('frm_moderators_not_exist_yet'));
         }
     }
     $tbl->addColumn($this->lng->txt('login'), 'login', '30%');
     $tbl->addColumn($this->lng->txt('firstname'), 'firstname', '30%');
     $tbl->addColumn($this->lng->txt('lastname'), 'lastname', '30%');
     $result = array();
     $i = 0;
     foreach ($entries as $usr_id) {
         /**
          * @var $user ilObjUser
          */
         $user = ilObjectFactory::getInstanceByObjId($usr_id);
         if ($num > 1) {
             $result[$i]['check'] = ilUtil::formCheckbox(false, 'usr_id[]', $user->getId());
         }
         $result[$i]['login'] = $user->getLogin();
         $result[$i]['firstname'] = $user->getFirstname();
         $result[$i]['lastname'] = $user->getLastname();
         ++$i;
     }
     $tbl->setData($result);
     $this->tpl->setContent($tbl->getHTML());
 }
 private function showCmd()
 {
     ilUtil::sendInfo($this->lng->txt('tst_skl_res_interpretation_hint_msg'));
     $selectedSkillProfile = ilTestSkillEvaluationToolbarGUI::fetchSkillProfileParam($_POST);
     $testSession = $this->getTestSession();
     $this->skillEvaluation->setUserId($testSession->getUserId());
     $this->skillEvaluation->setActiveId($testSession->getActiveId());
     $this->skillEvaluation->setPass($testSession->getPass());
     $settings = new ilSetting('assessment');
     $this->skillEvaluation->setNumRequiredBookingsForSkillTriggering($settings->get('ass_skl_trig_num_answ_barrier', ilObjAssessmentFolder::DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER));
     $testResults = $this->getTestResults();
     $this->skillEvaluation->init($this->getQuestionList());
     $this->skillEvaluation->evaluate($testResults);
     $evaluationToolbarGUI = $this->buildEvaluationToolbarGUI($selectedSkillProfile);
     $personalSkillsGUI = $this->buildPersonalSkillsGUI($testSession->getUserId(), $selectedSkillProfile);
     $this->tpl->setContent($this->ctrl->getHTML($evaluationToolbarGUI) . $this->ctrl->getHTML($personalSkillsGUI));
 }
Exemplo n.º 29
0
 /**
  * @param $type
  */
 protected function buildFrame($type)
 {
     if ($type == 'pad') {
         $this->tabs->activateTab('edit');
     } elseif ($type == 'slider') {
         $this->tabs->activateTab('timeslider');
     }
     $this->object->addUser($this->user);
     $iframe = $this->pl->getTemplate('default/tpl.iframe.html');
     $iframe->setVariable('HOST', $this->object->getHttpProtocol() . $this->object->getTeamhost());
     $iframe->setVariable('PAD_ID', $this->object->getPadId());
     $iframe->setVariable('REF_ID', $this->object->getRefId());
     $iframe->setVariable('TYPE', $type);
     $iframe->setVariable('SCROLLING', $this->object->getScrolling() ? 'auto' : 'no');
     $iframe->setVariable('ACCOUNT', $this->object->getIliasUser($this->user) . '@' . $this->object->getTeamhost());
     $this->tpl->setContent($iframe->get());
 }
 public function startImport()
 {
     $form = $this->initForm("startImport");
     if (!$form->checkInput()) {
         $this->tpl->setContent($form->getHTML());
     } else {
         $file = $form->getInput("import_file");
         $importer = new ilOrgUnitSimpleImport();
         try {
             $importer->simpleImport($file["tmp_name"]);
         } catch (Exception $e) {
             $this->ilLog->write($e->getMessage() . " - " . $e->getTraceAsString());
             ilUtil::sendFailure($this->lng->txt("import_failed"), true);
             $this->ctrl->redirect($this, "render");
         }
         $this->displayImportResults($importer);
     }
 }