当前位置: 首页>>代码示例>>PHP>>正文


PHP ilCtrl::setParameter方法代码示例

本文整理汇总了PHP中ilCtrl::setParameter方法的典型用法代码示例。如果您正苦于以下问题:PHP ilCtrl::setParameter方法的具体用法?PHP ilCtrl::setParameter怎么用?PHP ilCtrl::setParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilCtrl的用法示例。


在下文中一共展示了ilCtrl::setParameter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fillRow

 /**
  * @param array $a_set
  */
 public function fillRow($a_set)
 {
     $ilUDFCheck = ilUDFCheck::find($a_set['id']);
     $ilUDFCheckGUI = new ilUDFCheckGUI($this->parent_obj);
     foreach ($this->getSelectableColumns() as $k => $v) {
         if ($k == 'actions') {
             $this->ctrl->setParameter($this->parent_obj, ilUDFCheckGUI::IDENTIFIER, $ilUDFCheck->getId());
             $this->ctrl->setParameter($ilUDFCheckGUI, ilUDFCheckGUI::IDENTIFIER, $ilUDFCheck->getId());
             $current_selection_list = new ilAdvancedSelectionListGUI();
             $current_selection_list->setListTitle($this->pl->txt('check_actions'));
             $current_selection_list->setId('check_actions' . $ilUDFCheck->getId());
             $current_selection_list->setUseImages(false);
             $current_selection_list->addItem($this->pl->txt('check_edit'), 'check_edit', $this->ctrl->getLinkTarget($this->parent_obj, ilUserSettingsGUI::CMD_EDIT));
             $current_selection_list->addItem($this->pl->txt('check_delete'), 'check_delete', $this->ctrl->getLinkTarget($this->parent_obj, ilUserSettingsGUI::CMD_CONFIRM_DELETE));
             $this->tpl->setCurrentBlock('td');
             $this->tpl->setVariable('VALUE', $current_selection_list->getHTML());
             $this->tpl->parseCurrentBlock();
             continue;
         }
         if ($this->isColumnSelected($k)) {
             if ($a_set[$k]) {
                 $this->tpl->setCurrentBlock('td');
                 $this->tpl->setVariable('VALUE', is_array($a_set[$k]) ? implode(", ", $a_set[$k]) : $a_set[$k]);
                 $this->tpl->parseCurrentBlock();
             } else {
                 $this->tpl->setCurrentBlock('td');
                 $this->tpl->setVariable('VALUE', ' ');
                 $this->tpl->parseCurrentBlock();
             }
         }
     }
 }
开发者ID:JKN-INC,项目名称:UserDefaults,代码行数:35,代码来源:class.ilUDFCheckTableGUI.php

示例2: buildQuestionStageRebuildLink

 /**
  * @param $afterRebuildQuestionStageCmd
  * @return string
  */
 private function buildQuestionStageRebuildLink($afterRebuildQuestionStageCmd)
 {
     $this->ctrl->setParameter($this, self::HTTP_PARAM_AFTER_REBUILD_QUESTION_STAGE_CMD, $afterRebuildQuestionStageCmd);
     $href = $this->ctrl->getLinkTarget($this, self::CMD_BUILD_QUESTION_STAGE);
     $label = $this->lng->txt('tst_btn_rebuild_random_question_stage');
     return "<a href=\"{$href}\">{$label}</a>";
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:11,代码来源:class.ilTestRandomQuestionSetConfigGUI.php

示例3: getPassDetailsOverview

 protected function getPassDetailsOverview($result_array, $active_id, $pass, $targetGUI, $targetCMD, $questionDetailsCMD, $questionAnchorNav, ilTestQuestionRelatedObjectivesList $objectivesList = null)
 {
     $this->ctrl->setParameter($targetGUI, 'active_id', $active_id);
     $this->ctrl->setParameter($targetGUI, 'pass', $pass);
     $tableGUI = $this->buildPassDetailsOverviewTableGUI($targetGUI, $targetCMD);
     $tableGUI->setAnswerListAnchorEnabled($questionAnchorNav);
     $tableGUI->setSingleAnswerScreenCmd($questionDetailsCMD);
     $tableGUI->setShowHintCount($this->object->isOfferingQuestionHintsEnabled());
     if ($objectivesList !== null) {
         $tableGUI->setQuestionRelatedObjectivesList($objectivesList);
         $tableGUI->setObjectiveOrientedPresentationEnabled(true);
     }
     $tableGUI->setActiveId($active_id);
     $tableGUI->setPass($pass);
     $tableGUI->setShowSuggestedSolution(false);
     $usersQuestionSolutions = array();
     foreach ($result_array as $key => $val) {
         if ($key === 'test' || $key === 'pass') {
             continue;
         }
         if ($this->object->getShowSolutionSuggested() && strlen($val['solution'])) {
             $tableGUI->setShowSuggestedSolution(true);
         }
         if (isset($val['pass'])) {
             $tableGUI->setPassColumnEnabled(true);
         }
         $usersQuestionSolutions[$key] = $val;
     }
     $tableGUI->initColumns()->initFilter();
     $tableGUI->setFilterCommand($targetCMD . 'SetTableFilter');
     $tableGUI->setResetCommand($targetCMD . 'ResetTableFilter');
     $tableGUI->setData($usersQuestionSolutions);
     return $this->ctrl->getHTML($tableGUI);
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:34,代码来源:class.ilTestServiceGUI.php

示例4: array

 function __showRolesTable($a_result_set, $a_from = "")
 {
     if (!$this->ilAccess->checkAccess("cat_administrate_users", "", $_GET["ref_id"])) {
         ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
         $this->ctrl->redirect($this, "");
     }
     $tbl =& $this->parent_gui->__initTableGUI();
     $tpl =& $tbl->getTemplateObject();
     // SET FORMAACTION
     $tpl->setCurrentBlock("tbl_form_header");
     $this->ctrl->setParameter($this, 'obj_id', $_GET['obj_id']);
     $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     $tpl->parseCurrentBlock();
     // SET FOOTER BUTTONS
     $tpl->setVariable("COLUMN_COUNTS", 4);
     $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
     $tpl->setCurrentBlock("tbl_action_button");
     $tpl->setVariable("BTN_NAME", "assignSave");
     $tpl->setVariable("BTN_VALUE", $this->lng->txt("change_assignment"));
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("tbl_action_row");
     $tpl->setVariable("TPLPATH", $this->tpl->tplPath);
     $tpl->parseCurrentBlock();
     $tmp_obj =& ilObjectFactory::getInstanceByObjId($_GET['obj_id']);
     $title = $this->lng->txt('role_assignment') . ' (' . $tmp_obj->getFullname() . ')';
     $tbl->setTitle($title, "icon_role.svg", $this->lng->txt("role_assignment"));
     $tbl->setHeaderNames(array('', $this->lng->txt("title"), $this->lng->txt('description'), $this->lng->txt("type")));
     $tbl->setHeaderVars(array("", "title", "description", "type"), array("ref_id" => $this->object->getRefId(), "cmd" => "assignRoles", "obj_id" => $_GET['obj_id'], "cmdClass" => "ilobjcategorygui", "cmdNode" => $_GET["cmdNode"]));
     $tbl->setColumnWidth(array("4%", "35%", "45%", "16%"));
     $this->set_unlimited = true;
     $this->parent_gui->__setTableGUIBasicData($tbl, $a_result_set, $a_from, true);
     $tbl->render();
     $this->tpl->setVariable("ROLES_TABLE", $tbl->tpl->get());
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:35,代码来源:class.ilLocalUserGUI.php

示例5: showStaffRec

 public function showStaffRec()
 {
     if (!ilObjOrgUnitAccess::_checkAccessStaffRec($this->parent_object->getRefId())) {
         ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
         $this->ctrl->redirect($this->parent_gui, "");
     }
     $this->ctrl->setParameter($this, "recursive", true);
     $this->tpl->setContent($this->getStaffTableHTML(true, "showStaffRec"));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:9,代码来源:class.ilOrgUnitStaffGUI.php

示例6: fillRow

 /**
  * @param array $a_set
  */
 public function fillRow($a_set)
 {
     $il_obj_entry = ilBibliographicEntry::getInstance($this->parent_obj->object->getFiletype(), $a_set['entry_id']);
     $this->tpl->setVariable('SINGLE_ENTRY', $il_obj_entry->getOverwiew());
     //Detail-Link
     $this->ctrl->setParameter($this->parent_obj, ilObjBibliographicGUI::P_ENTRY_ID, $a_set['entry_id']);
     $this->tpl->setVariable('DETAIL_LINK', $this->ctrl->getLinkTarget($this->parent_obj, 'showDetails'));
     // generate/render links to libraries
     $settings = ilBibliographicSetting::getAll();
     $arr_library_link = array();
     foreach ($settings as $set) {
         if ($set->getShowInList()) {
             $arr_library_link[] = $set->getButton($this->parent_obj->object, $il_obj_entry);
         }
     }
     if (count($arr_library_link)) {
         $this->tpl->setVariable('LIBRARY_LINK', implode('<br/>', $arr_library_link));
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:22,代码来源:class.ilBibliographicRecordListTableGUI.php

示例7: editRoleAssignment

 /**
  * Edit Role Assignment
  *
  * @return
  */
 protected function editRoleAssignment()
 {
     $this->ctrl->setParameter($this, 'rule_id', (int) $_GET['rule_id']);
     $this->tabs_gui->setSubTabActive('shib_role_assignment');
     $this->initFormRoleAssignment('update');
     $this->getRuleValues();
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.shib_role_assignment.html', 'Services/AuthShibboleth');
     $this->tpl->setVariable('NEW_RULE_TABLE', $this->form->getHTML());
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:15,代码来源:class.ilAuthShibbolethSettingsGUI.php

示例8: executeCommand

 /**
  * execute command
  */
 public function executeCommand()
 {
     global $ilLocator, $lng;
     $next_class = $this->ctrl->getNextClass($this);
     $viewdef = $this->getPageObject();
     if ($viewdef) {
         $this->ctrl->setParameter($this, "dclv", $viewdef->getId());
         $title = $lng->txt("dcl_view_viewdefinition");
     }
     switch ($next_class) {
         case "ilpageobjectgui":
             throw new ilCOPageException("Deprecated. ilDataCollectionRecordViewViewdefinitionGUI gui forwarding to ilpageobject");
         default:
             if ($viewdef) {
                 $this->setPresentationTitle($title);
                 $ilLocator->addItem($title, $this->ctrl->getLinkTarget($this, "preview"));
             }
             return parent::executeCommand();
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:23,代码来源:class.ilDataCollectionRecordViewViewdefinitionGUI.php

示例9: saveType

 /**
  * 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());
     }
 }
开发者ID:studer-raimann,项目名称:Certificate,代码行数:15,代码来源:class.srCertificateTypeGUI.php

示例10: questionsObject

 protected function questionsObject()
 {
     /** @var $ilAccess ilAccessHandler */
     global $ilAccess;
     if (!$ilAccess->checkAccess("write", "", $this->ref_id)) {
         // allow only write access
         ilUtil::sendInfo($this->lng->txt("cannot_edit_test"), true);
         $this->ctrl->redirect($this, "infoScreen");
     }
     if ($_GET['browse']) {
         exit('Browse??');
         return $this->object->questionbrowser();
     }
     if ($_GET["eqid"] && $_GET["eqpl"]) {
         $this->ctrl->setParameter($this, 'q_id', $_GET["eqid"]);
         $this->ctrl->setParameter($this, 'qpl_id', $_GET["eqpl"]);
         $this->ctrl->redirect($this, 'adjustscoringfortest');
     }
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_questions.html", "Modules/Test");
     $this->tpl->setCurrentBlock("adm_content");
     include_once "./Modules/Test/classes/tables/class.ilTestQuestionsTableGUI.php";
     $checked_move = is_array($_SESSION['tst_qst_move_' . $this->object->getTestId()]) && count($_SESSION['tst_qst_move_' . $this->object->getTestId()]);
     $table_gui = new ilTestQuestionsTableGUI($this, 'showquestionlist', $ilAccess->checkAccess("write", "", $this->ref_id) ? true : false, $checked_move, 0);
     $data = $this->object->getTestQuestions();
     // @TODO Ask object for random test.
     if (!$data) {
         $this->object->getPotentialRandomTestQuestions();
     }
     $filtered_data = array();
     foreach ($data as $question) {
         $question_object = assQuestion::instantiateQuestionGUI($question['question_id']);
         if ($this->supportsAdjustment($question_object) && $this->allowedInAdjustment($question_object)) {
             $filtered_data[] = $question;
         }
     }
     $table_gui->setData($filtered_data);
     $table_gui->clearActionButtons();
     $table_gui->clearCommandButtons();
     $table_gui->multi = array();
     $table_gui->setRowTemplate('tpl.il_as_tst_adjust_questions_row.html', 'Modules/Test');
     $table_gui->header_commands = array();
     $table_gui->setSelectAllCheckbox(null);
     $this->tpl->setVariable('QUESTIONBROWSER', $table_gui->getHTML());
     $this->tpl->setVariable("ACTION_QUESTION_FORM", $this->ctrl->getFormAction($this, 'showquestionlist'));
     $this->tpl->parseCurrentBlock();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:46,代码来源:class.ilScoringAdjustmentGUI.php

示例11: executeCommand

 /**
  * Execute Command
  * 
  * @access public
  */
 public function executeCommand()
 {
     $cmd = $this->ctrl->getCmd(self::CMD_SHOW);
     $nextClass = $this->ctrl->getNextClass($this);
     $this->ctrl->setParameter($this, 'q_id', (int) $_GET['q_id']);
     switch ($nextClass) {
         case 'ilassspecfeedbackpagegui':
         case 'ilassgenfeedbackpagegui':
             require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackPageObjectCommandForwarder.php';
             $forwarder = new ilAssQuestionFeedbackPageObjectCommandForwarder($this->questionOBJ, $this->ctrl, $this->tabs, $this->lng);
             $forwarder->forward();
             break;
         default:
             $cmd .= 'Cmd';
             $this->{$cmd}();
             break;
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:23,代码来源:class.ilAssQuestionFeedbackEditingGUI.php

示例12: buildActions

 /**
  * Build action menu for a record asynchronous
  *
  */
 protected function buildActions()
 {
     $alist = new ilAdvancedSelectionListGUI();
     $alist->setId((int) $_GET['cert_id']);
     $alist->setListTitle($this->pl->txt('actions'));
     $this->ctrl->setParameter($this, 'cert_id', (int) $_GET['cert_id']);
     switch ($_GET['status']) {
         case srCertificate::STATUS_CALLED_BACK:
             $alist->addItem($this->pl->txt('undo_callback'), 'undoCallback', $this->ctrl->getLinkTarget($this, 'undoCallBack'));
             break;
         case srCertificate::STATUS_FAILED:
             $alist->addItem($this->pl->txt('retry'), 'retry', $this->ctrl->getLinkTarget($this, 'retryGeneration'));
             break;
         case srCertificate::STATUS_PROCESSED:
             $alist->addItem($this->pl->txt('download'), 'download', $this->ctrl->getLinkTarget($this, 'downloadCertificate'));
             $alist->addItem($this->pl->txt('call_back'), 'call_back', $this->ctrl->getLinkTarget($this, 'callBack'));
             break;
     }
     echo $alist->getHTML(true);
     exit;
 }
开发者ID:studer-raimann,项目名称:Certificate,代码行数:25,代码来源:class.srCertificateDefinitionGUI.php

示例13: initUnitCategoryForm

 /**
  * @param assFormulaQuestionUnitCategory $cat
  * @return ilPropertyFormGUI
  */
 protected function initUnitCategoryForm(assFormulaQuestionUnitCategory $cat = null)
 {
     if ($this->unit_cat_form instanceof ilPropertyFormGUI) {
         return $this->unit_cat_form;
     }
     $this->unit_cat_form = new ilPropertyFormGUI();
     $title = new ilTextInputGUI($this->lng->txt('title'), 'category_name');
     $title->setRequired(true);
     $this->unit_cat_form->addItem($title);
     if (null === $cat) {
         $this->unit_cat_form->setTitle($this->lng->txt('new_category'));
         $this->unit_cat_form->setFormAction($this->ctrl->getFormAction($this, 'addCategory'));
         $this->unit_cat_form->addCommandButton('addCategory', $this->lng->txt('save'));
     } else {
         $this->ctrl->setParameter($this, 'category_id', $cat->getId());
         $this->unit_cat_form->addCommandButton('saveCategory', $this->lng->txt('save'));
         $this->unit_cat_form->setFormAction($this->ctrl->getFormAction($this, 'saveCategory'));
         $this->unit_cat_form->setTitle(sprintf($this->lng->txt('selected_category'), $cat->getDisplayString()));
     }
     $this->unit_cat_form->addCommandButton($this->getUnitCategoryOverviewCommand(), $this->lng->txt('cancel'));
     return $this->unit_cat_form;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.ilUnitConfigurationGUI.php

示例14: getPassListOfAnswersWithScoring

 /**
  * Returns the list of answers of a users test pass and offers a scoring option
  *
  * @param array $result_array An array containing the results of the users test pass (generated by ilObjTest::getTestResult)
  * @param integer $active_id Active ID of the active user
  * @param integer $pass Test pass
  * @param boolean $show_solutions TRUE, if the solution output should be shown in the answers, FALSE otherwise
  * @return string HTML code of the list of answers
  * @access public
  * 
  * @deprecated
  */
 function getPassListOfAnswersWithScoring(&$result_array, $active_id, $pass, $show_solutions = FALSE)
 {
     include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
     $maintemplate = new ilTemplate("tpl.il_as_tst_list_of_answers.html", TRUE, TRUE, "Modules/Test");
     include_once "./Modules/Test/classes/class.ilObjAssessmentFolder.php";
     $scoring = ilObjAssessmentFolder::_getManualScoring();
     $counter = 1;
     // output of questions with solutions
     foreach ($result_array as $question_data) {
         $question = $question_data["qid"];
         if (is_numeric($question)) {
             $question_gui = $this->object->createQuestionGUI("", $question);
             if (in_array($question_gui->object->getQuestionTypeID(), $scoring)) {
                 $template = new ilTemplate("tpl.il_as_qpl_question_printview.html", TRUE, TRUE, "Modules/TestQuestionPool");
                 $scoretemplate = new ilTemplate("tpl.il_as_tst_manual_scoring_points.html", TRUE, TRUE, "Modules/Test");
                 #mbecker: No such block. $this->tpl->setCurrentBlock("printview_question");
                 $template->setVariable("COUNTER_QUESTION", $counter . ". ");
                 $template->setVariable("QUESTION_TITLE", $this->object->getQuestionTitle($question_gui->object->getTitle()));
                 $points = $question_gui->object->getMaximumPoints();
                 if ($points == 1) {
                     $template->setVariable("QUESTION_POINTS", $points . " " . $this->lng->txt("point"));
                 } else {
                     $template->setVariable("QUESTION_POINTS", $points . " " . $this->lng->txt("points"));
                 }
                 $show_question_only = $this->object->getShowSolutionAnswersOnly() ? TRUE : FALSE;
                 $result_output = $question_gui->getSolutionOutput($active_id, $pass, $show_solutions, FALSE, $show_question_only, $this->object->getShowSolutionFeedback(), FALSE, TRUE);
                 $solout = $question_gui->object->getSuggestedSolutionOutput();
                 if (strlen($solout)) {
                     $scoretemplate->setCurrentBlock("suggested_solution");
                     $scoretemplate->setVariable("TEXT_SUGGESTED_SOLUTION", $this->lng->txt("solution_hint"));
                     $scoretemplate->setVariable("VALUE_SUGGESTED_SOLUTION", $solout);
                     $scoretemplate->parseCurrentBlock();
                 }
                 $scoretemplate->setCurrentBlock("feedback");
                 $scoretemplate->setVariable("FEEDBACK_NAME_INPUT", $question);
                 $feedback = $this->object->getManualFeedback($active_id, $question, $pass);
                 $scoretemplate->setVariable("VALUE_FEEDBACK", ilUtil::prepareFormOutput($this->object->prepareTextareaOutput($feedback, TRUE)));
                 $scoretemplate->setVariable("TEXT_MANUAL_FEEDBACK", $this->lng->txt("set_manual_feedback"));
                 $scoretemplate->parseCurrentBlock();
                 $scoretemplate->setVariable("NAME_INPUT", $question);
                 $this->ctrl->setParameter($this, "active_id", $active_id);
                 $this->ctrl->setParameter($this, "pass", $pass);
                 $scoretemplate->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "manscoring"));
                 $scoretemplate->setVariable("LABEL_INPUT", $this->lng->txt("tst_change_points_for_question"));
                 $scoretemplate->setVariable("VALUE_INPUT", " value=\"" . assQuestion::_getReachedPoints($active_id, $question_data["qid"], $pass) . "\"");
                 $scoretemplate->setVariable("VALUE_SAVE", $this->lng->txt("save"));
                 $template->setVariable("SOLUTION_OUTPUT", $result_output);
                 $maintemplate->setCurrentBlock("printview_question");
                 $maintemplate->setVariable("QUESTION_PRINTVIEW", $template->get());
                 $maintemplate->setVariable("QUESTION_SCORING", $scoretemplate->get());
                 $maintemplate->parseCurrentBlock();
             }
             $counter++;
         }
     }
     if ($counter == 1) {
         // no scorable questions found
         $maintemplate->setVariable("NO_QUESTIONS_FOUND", $this->lng->txt("manscoring_questions_not_found"));
     }
     $maintemplate->setVariable("RESULTS_OVERVIEW", sprintf($this->lng->txt("manscoring_results_pass"), $pass + 1));
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initDomEvent();
     return $maintemplate->get();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:76,代码来源:class.ilTestServiceGUI.php

示例15: fillRow

 /**
  * @param ilForumTopic $thread
  */
 public function fillRow(ilForumTopic $thread)
 {
     /**
      * @var $ilUser ilObjUser
      */
     global $ilUser;
     $this->ctrl->setParameter($this->getParentObject(), 'thr_pk', $thread->getId());
     if ('mergeThreads' == $this->parent_cmd) {
         $checked = $this->max_count == 1 || isset($_POST['thread_ids']) && in_array($thread->getId(), $_POST['thread_ids']);
         $this->tpl->setVariable('VAL_CHECK', ilUtil::formRadioButton($checked, 'thread_ids[]', $thread->getId()));
     } else {
         if ('showThreads' == $this->parent_cmd) {
             $this->tpl->setVariable('VAL_CHECK', ilUtil::formCheckbox(isset($_POST['thread_ids']) && in_array($thread->getId(), $_POST['thread_ids']) ? true : false, 'thread_ids[]', $thread->getId()));
         } else {
             if ($thread->isSticky()) {
                 $this->tpl->setVariable('VAL_SORTING_NAME', 'thread_sorting[' . $thread->getId() . ']');
                 $this->tpl->setVariable('VAL_SORTING', (int) $this->position * 10);
             } else {
                 $this->tpl->setVariable('VAL_CHECK', '');
             }
             $this->position++;
         }
     }
     $subject = '';
     if ($thread->isSticky()) {
         $subject .= '<span class="light">[' . $this->lng->txt('sticky') . ']</span> ';
     }
     if ($thread->isClosed()) {
         $subject .= '<span class="light">[' . $this->lng->txt('topic_close') . ']</span> ';
     }
     if (!$ilUser->isAnonymous() && $this->ilias->getSetting('forum_notification') != 0 && $thread->getUserNotificationEnabled()) {
         $subject .= '<span class="light">[' . $this->lng->txt('forums_notification_enabled') . ']</span> ';
     }
     $num_posts = $thread->getNumPosts();
     $num_unread = $thread->getNumUnreadPosts();
     $num_new = $thread->getNumNewPosts();
     if ($num_posts > 0) {
         $subject = '<div><a href="' . $this->ctrl->getLinkTarget($this->getParentObject(), 'viewThread') . '">' . $thread->getSubject() . '</a></div>' . $subject;
     } else {
         $subject = $thread->getSubject() . $subject;
     }
     $this->tpl->setVariable('VAL_SUBJECT', $subject);
     // Author
     $this->ctrl->setParameter($this->getParentObject(), 'backurl', urlencode($this->ctrl->getLinkTargetByClass("ilrepositorygui", "")));
     $this->ctrl->setParameter($this->getParentObject(), 'user', $thread->getUserId());
     $authorinfo = new ilForumAuthorInformation($thread->getUserId(), $thread->getUserAlias(), $thread->getImportName(), array('class' => 'il_ItemProperty', 'href' => $this->ctrl->getLinkTarget($this->getParentObject(), 'showUser')));
     $this->tpl->setVariable('VAL_AUTHOR', $authorinfo->getLinkedAuthorName());
     $topicStats = $num_posts;
     if (!$ilUser->isAnonymous()) {
         if ($num_unread > 0) {
             $topicStats .= '<br /><span class="alert ilWhiteSpaceNowrap">' . $this->lng->txt('unread') . ': ' . $num_unread . '</span>';
         }
         if ($num_new > 0 && $this->getOverviewSetting() == 0) {
             $topicStats .= '<br /><span class="alert ilWhiteSpaceNowrap">' . $this->lng->txt('new') . ': ' . $num_new . '</span>';
         }
     }
     $this->tpl->setVariable('VAL_ARTICLE_STATS', $topicStats);
     $this->tpl->setVariable('VAL_NUM_VISIT', $thread->getVisits());
     // Last posting
     if ($num_posts > 0) {
         if ($this->getIsModerator()) {
             $objLastPost = $thread->getLastPost();
         } else {
             $objLastPost = $thread->getLastActivePost();
         }
         if (is_object($objLastPost)) {
             $authorinfo = new ilForumAuthorInformation($objLastPost->getUserId(), $objLastPost->getUserAlias(), $objLastPost->getImportName(), array('href' => $this->ctrl->getLinkTarget($this->getParentObject(), 'viewThread') . '#' . $objLastPost->getId()));
             $this->tpl->setVariable('VAL_LP_DATE', '<div class="ilWhiteSpaceNowrap">' . ilDatePresentation::formatDate(new ilDateTime($objLastPost->getCreateDate(), IL_CAL_DATETIME)) . '</div>' . '<div class="ilWhiteSpaceNowrap">' . $this->lng->txt('from') . ' ' . $authorinfo->getLinkedAuthorName() . '</div>');
         }
     }
     // Row style
     $css_row = $this->css_row;
     if ($thread->isSticky()) {
         $css_row = $css_row == 'tblrow1' ? 'tblstickyrow1' : 'tblstickyrow2';
     }
     $this->tpl->setVariable('CSS_ROW', $css_row);
     $this->ctrl->setParameter($this->getParentObject(), 'thr_pk', '');
     $this->ctrl->setParameter($this->getParentObject(), 'user', '');
     $this->ctrl->setParameter($this->getParentObject(), 'backurl', '');
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:83,代码来源:class.ilForumTopicTableGUI.php


注:本文中的ilCtrl::setParameter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。