• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ilDatePresentation类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: formatDateTimeField

 /**
  * @static
  * @param $value string
  * @return string
  */
 protected static function formatDateTimeField($value)
 {
     if (!strlen($value)) {
         return $value;
     }
     return ilDatePresentation::formatDate(new ilDateTime($value, IL_CAL_DATETIME));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:12,代码来源:class.ilShopCouponsTableGUI.php


示例2: fillRow

 /**
  * Fill table row
  */
 protected function fillRow($d)
 {
     global $lng, $ilCtrl;
     $this->tpl->setVariable("ID", $d["id"]);
     if ($d["deadline"] > 0) {
         $this->tpl->setVariable("TXT_DEADLINE", ilDatePresentation::formatDate(new ilDateTime($d["deadline"], IL_CAL_UNIX)));
     }
     if ($d["start_time"] > 0) {
         $this->tpl->setVariable("TXT_START_TIME", ilDatePresentation::formatDate(new ilDateTime($d["start_time"], IL_CAL_UNIX)));
     }
     $this->tpl->setVariable("TXT_INSTRUCTIONS", ilUtil::shortenText($d["instruction"], 200, true));
     if ($d["mandatory"]) {
         $this->tpl->setVariable("TXT_MANDATORY", $lng->txt("yes"));
     } else {
         $this->tpl->setVariable("TXT_MANDATORY", $lng->txt("no"));
     }
     if ($d["peer"]) {
         $this->tpl->setVariable("TXT_PEER", $lng->txt("yes") . " (" . $d["peer_min"] . ")");
     } else {
         $this->tpl->setVariable("TXT_PEER", $lng->txt("no"));
     }
     $this->tpl->setVariable("TXT_TITLE", $d["title"]);
     $this->tpl->setVariable("TXT_TYPE", $d["type"]);
     $this->tpl->setVariable("ORDER_VAL", $d["order_val"]);
     $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit"));
     $ilCtrl->setParameter($this->parent_obj, "ass_id", $d["id"]);
     $this->tpl->setVariable("CMD_EDIT", $ilCtrl->getLinkTarget($this->parent_obj, "editAssignment"));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:31,代码来源:class.ilAssignmentsTableGUI.php


示例3: ilEphorusReportHeaderTableGUI

 function ilEphorusReportHeaderTableGUI($a_parent_obj, $a_parent_cmd, $document)
 {
     global $ilCtrl, $lng;
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->setTopCommands(false);
     $this->addColumn($lng->txt("rep_robj_xeph_document_info"));
     $this->addColumn("");
     $this->setEnableHeader(true);
     $this->setRowTemplate("tpl.eph_report_header.html", "Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus");
     $this->disable("footer");
     $member = ilObjUser::_lookupName($document->user_id);
     $a_data = array();
     $student = array();
     $student["key"] = "student";
     $student["value"] = $member["firstname"] . " " . $member["lastname"];
     array_push($a_data, $student);
     $ilCtrl->setParameter($this->parent_obj, "filename", $document->filename);
     $ilCtrl->setParameter($this->parent_obj, "filetitle", $document->filetitle);
     $ilCtrl->setParameter($this->parent_obj, "part_id", $document->user_id);
     $doc = array();
     $doc["key"] = "document";
     $doc["value"] = "<a href=\"" . $ilCtrl->getLinkTarget($this->parent_obj, "downloadSubmittedFile") . "\">" . $document->filetitle . "</a>";
     array_push($a_data, $doc);
     $ilCtrl->setParameter($this->parent_obj, "filename", "");
     $ilCtrl->setParameter($this->parent_obj, "filetitle", "");
     $submission_date = array();
     $submission_date["key"] = "submission_date";
     $submission_date["value"] = ilDatePresentation::formatDate(new ilDateTime($document->date_created, IL_CAL_DATETIME));
     array_push($a_data, $submission_date);
     $this->setData($a_data);
 }
开发者ID:jmcgettrick,项目名称:ilias-ephorus,代码行数:31,代码来源:class.ilEphorusReportTableGUI.php


示例4: send

 public function send()
 {
     global $lng;
     $additional_information = $this->getAdditionalInformation();
     $old_val = ilDatePresentation::useRelativeDates();
     ilDatePresentation::setUseRelativeDates(false);
     foreach ($this->getRecipients() as $rcp) {
         try {
             $this->handleCurrentRecipient($rcp);
         } catch (ilMailException $e) {
             continue;
         }
         $this->initMimeMail();
         $this->initLanguageByIso2Code();
         ilDatePresentation::setLanguage($this->getLanguage());
         $date_for_deletion = ilDatePresentation::formatDate(new ilDate($additional_information["date"], IL_CAL_UNIX));
         $this->setSubject($this->getLanguage()->txt('del_mail_subject'));
         $body = sprintf($this->getLanguage()->txt("del_mail_body"), $rcp->fullname, "\n\n", $additional_information["www"], $date_for_deletion);
         $this->appendBody($body);
         $this->appendBody(ilMail::_getInstallationSignature());
         $this->sendMimeMail($this->getCurrentRecipient());
     }
     ilDatePresentation::setUseRelativeDates($old_val);
     ilDatePresentation::setLanguage($lng);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:25,代码来源:class.ilCronDeleteInactiveUserReminderMailNotification.php


示例5: sendAdvancedNotification

 /**
  * send an advanced notification to the owner of the test
  * @param int $owner_id
  * @param string $title
  * @param sting $usr_data
  * @param array $file_names
  */
 public function sendAdvancedNotification($owner_id, $title, $usr_data, $file_names)
 {
     $this->initLanguage($owner_id);
     $this->language->loadLanguageModule('assessment');
     $this->initMail();
     $this->setSubject(sprintf($this->language->txt('tst_user_finished_test'), $title));
     $this->setBody(ilMail::getSalutation($owner_id, $this->getLanguage()));
     $this->appendBody("\n\n");
     $this->appendBody($this->language->txt('user_has_finished_a_test'));
     $this->appendBody("\n\n");
     $this->appendBody($this->language->txt('title') . ': ' . $title);
     $this->appendBody("\n");
     $this->appendBody($this->language->txt('username') . ': ' . $usr_data);
     $this->appendBody("\n");
     ilDatePresentation::setUseRelativeDates(false);
     $this->appendBody($this->language->txt('tst_finished') . ': ' . ilDatePresentation::formatDate(new ilDateTime(time(), IL_CAL_UNIX)));
     $this->appendBody("\n\n");
     $this->appendBody($this->language->txt('tst_attached_xls_file'));
     $this->appendBody("\n\n");
     $this->appendBody($this->language->txt('tst_notification_explanation_admin'));
     $this->appendBody("\n");
     $this->setAttachments($file_names);
     $this->getMail()->appendInstallationSignature(true);
     $this->sendMail(array($owner_id), array('system'));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:32,代码来源:class.ilTestMailNotification.php


示例6: fillRow

 /**
  * Fill template row
  * 
  * @param array $a_set
  */
 protected function fillRow($a_set)
 {
     $date = ilDatePresentation::formatDate(new ilDateTime($a_set["tstamp"], IL_CAL_UNIX));
     $this->tpl->setVariable("TSTAMP", $date);
     $this->tpl->setVariable("TXT_USER", $a_set["user"]);
     $this->tpl->setVariable("TXT_DETAILS", $a_set["details"]);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:12,代码来源:class.ilExAssignmentTeamLogTableGUI.php


示例7: fillRow

 /**
  * @param array $row
  */
 public function fillRow(array $row)
 {
     $old_value = ilDatePresentation::useRelativeDates();
     ilDatePresentation::setUseRelativeDates(false);
     $row['date'] = ilDatePresentation::formatDate(new ilDateTime($row['date'], IL_CAL_UNIX));
     ilDatePresentation::setUseRelativeDates($old_value);
     if (array_key_exists('percentage', $row)) {
         $row['percentage'] = sprintf('%.2f', $row['percentage']) . '%';
     }
     // fill columns
     if (!$this->isObjectiveOrientedPresentationEnabled()) {
         $this->tpl->setVariable('VAL_SCORED', $row['scored']);
         $this->tpl->setVariable('VAL_PASS', $row['pass']);
     }
     $this->tpl->setVariable('VAL_DATE', $row['date']);
     if ($this->isObjectiveOrientedPresentationEnabled()) {
         $this->tpl->setVariable('VAL_LO_OBJECTIVES', $row['objectives']);
         $this->tpl->setVariable('VAL_LO_TRY', sprintf($this->lng->txt('tst_res_lo_try_n'), $row['pass']));
     }
     $this->tpl->setVariable('VAL_ANSWERED', $row['answered']);
     if (isset($row['hints'])) {
         $this->tpl->setVariable('VAL_HINTS', $row['hints']);
     }
     $this->tpl->setVariable('VAL_REACHED', $row['reached']);
     $this->tpl->setVariable('VAL_PERCENTAGE', $row['percentage']);
     if (!$this->pdf_view) {
         $this->tpl->setVariable('VAL_PASS_DETAILS', $row['pass_details']);
     }
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:32,代码来源:class.ilTestPassOverviewTableGUI.php


示例8: getHTML

 public function getHTML()
 {
     if (!$this->getADT()->isNull()) {
         // :TODO: relative dates?
         return ilDatePresentation::formatDate($this->getADT()->getDate());
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:7,代码来源:class.ilADTDatePresentationBridge.php


示例9: fillRow

 protected function fillRow($a_set)
 {
     $this->tpl->setVariable("DATE", ilDatePresentation::formatDate(new ilDateTime($a_set["created"], IL_CAL_UNIX)));
     $name = ilObjUser::_lookupName($a_set["user_id"]);
     $this->tpl->setVariable("LASTNAME", $name["lastname"]);
     $this->tpl->setVariable("FIRSTNAME", $name["firstname"]);
     $this->tpl->setVariable("LOGIN", $name["login"]);
     $this->tpl->setVariable("ACTION", $this->action_map[$a_set["action"]]);
     if ($a_set["action"] == ilRbacLog::CHANGE_OWNER) {
         $user = ilObjUser::_lookupFullname($a_set["data"][0]);
         $changes = array(array("action" => $this->lng->txt("rbac_log_changed_owner"), "operation" => $user));
     } else {
         if ($a_set["action"] == ilRbacLog::EDIT_TEMPLATE) {
             $changes = $this->parseChangesTemplate($a_set["data"]);
         } else {
             $changes = $this->parseChangesFaPa($a_set["data"]);
         }
     }
     $this->tpl->setCurrentBlock("changes");
     foreach ($changes as $change) {
         $this->tpl->setVariable("CHANGE_ACTION", $change["action"]);
         $this->tpl->setVariable("CHANGE_OPERATION", $change["operation"]);
         $this->tpl->parseCurrentBlock();
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:25,代码来源:class.ilRbacLogTableGUI.php


示例10: getCertificateVariablesForPresentation

 /**
  * Returns an array containing all variables and values which can be exchanged in the certificate
  * The values should be calculated from real data. The $params parameter array should contain all
  * necessary information to calculate the values.
  *
  * @param array $params An array of parameters to calculate the certificate parameter values
  * @return array The certificate variables
  */
 public function getCertificateVariablesForPresentation($params = array())
 {
     global $lng;
     $lng->loadLanguageModule('certificate');
     $user_data = $params["user_data"];
     $vars = $this->getBaseVariablesForPresentation($user_data, $params["last_access"], null);
     $vars["SKILL_TITLE"] = ilUtil::prepareFormOutput($this->skill->getTitleForCertificate());
     $vars["SKILL_LEVEL_TITLE"] = ilUtil::prepareFormOutput($this->skill->getLevelTitleForCertificate($this->skill_level_id));
     $vars["SKILL_TRIGGER_TITLE"] = ilUtil::prepareFormOutput($this->skill->getTriggerTitleForCertificate($this->skill_level_id));
     // custom completion date
     $achievement_date = ilBasicSkill::lookupLevelAchievementDate($user_data["usr_id"], $this->skill_level_id);
     if ($achievement_date !== false) {
         $old = ilDatePresentation::useRelativeDates();
         ilDatePresentation::setUseRelativeDates(false);
         $vars["DATE_COMPLETED"] = ilDatePresentation::formatDate(new ilDate($achievement_date, IL_CAL_DATETIME));
         $vars["DATETIME_COMPLETED"] = ilDatePresentation::formatDate(new ilDateTime($achievement_date, IL_CAL_DATETIME));
         ilDatePresentation::setUseRelativeDates($old);
     } else {
         $vars["DATE_COMPLETED"] = "";
         $vars["DATETIME_COMPLETED"] = "";
     }
     foreach ($vars as $id => $caption) {
         $insert_tags["[" . $id . "]"] = $caption;
     }
     return $insert_tags;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:34,代码来源:class.ilSkillCertificateAdapter.php


示例11: fillRow

 /**
  * Fill a single data row.
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl;
     // box title
     if ($a_set["box"] == 0) {
         $this->tpl->setVariable("BOX", $this->plugin->txt("leitner_box_0_title"));
     } else {
         $this->tpl->setVariable("BOX", sprintf($this->plugin->txt("leitner_box_x_title"), $a_set["box"]));
     }
     // box data
     $this->tpl->setVariable("CAPACITY", $a_set["capacity"]);
     $this->tpl->setVariable("COUNT", $a_set["count"]);
     $this->tpl->setVariable("LAST_TRAINED", ilDatePresentation::formatDate($a_set["last_trained"]));
     // actions
     if ($a_set["count"]) {
         $ilCtrl->setParameter($this->parent, "box", $a_set["box"]);
         $this->tpl->setVariable("LINK_TRAINING", $ilCtrl->getLinkTarget($this->parent, "startTraining"));
         $this->tpl->setVariable("TXT_TRAINING", $this->plugin->txt("start_training"));
     }
     // training alert
     if ($a_set["count"] >= $a_set["capacity"]) {
         $this->tpl->setVariable("SRC_TRAINING_ALERT", $this->plugin->getImagePath("clock.png"));
         $this->tpl->setVariable("TXT_TRAINING_ALERT", $this->plugin->txt("training_needed"));
     }
 }
开发者ID:ilifau,项目名称:Flashcards,代码行数:28,代码来源:class.ilLeitnerTableGUI.php


示例12: fillRow

 /**
  * Fill table row
  */
 protected function fillRow($file)
 {
     global $lng;
     $this->tpl->setVariable("FILE_ID", $file["id"]);
     $this->tpl->setVariable("DELIVERED_FILE", $file["filetitle"]);
     $date = new ilDateTime($file['timestamp14'], IL_CAL_TIMESTAMP);
     $this->tpl->setVariable("DELIVERED_DATE", ilDatePresentation::formatDate($date));
 }
开发者ID:jmcgettrick,项目名称:ilias-ephorus,代码行数:11,代码来源:class.ilEphDeliveredFilesTableGUI.php


示例13: fillRowExcel

 protected function fillRowExcel($a_worksheet, &$a_row, $a_set)
 {
     $a_worksheet->write($a_row, 0, $a_set["login"]);
     $a_worksheet->write($a_row, 1, $a_set["firstname"]);
     $a_worksheet->write($a_row, 2, $a_set["lastname"]);
     $a_worksheet->write($a_row, 3, ilFormat::_secondsToShortString($a_set["online_time"]));
     $a_worksheet->write($a_row, 4, ilDatePresentation::formatDate(new ilDateTime($a_set["last_login"], IL_CAL_DATETIME)));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:8,代码来源:class.ilUserLPTableGUI.php


示例14: fillRow

 /**
  * Fill table row
  */
 protected function fillRow($file)
 {
     global $lng;
     $this->tpl->setVariable("FILE_ID", $file["returned_id"]);
     $this->tpl->setVariable("DELIVERED_FILE", $file["filetitle"]);
     $date = new ilDateTime($file['timestamp14'], IL_CAL_TIMESTAMP);
     $this->tpl->setVariable("DELIVERED_DATE", ilDatePresentation::formatDate($date));
     if ($this->ass->getType() == ilExAssignment::TYPE_UPLOAD_TEAM) {
         $this->tpl->setVariable("DELIVERED_OWNER", ilUserUtil::getNamePresentation($file["owner_id"]));
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:14,代码来源:class.ilExcDeliveredFilesTableGUI.php


示例15: formatValue

 /**
  * @param string $column
  * @param string $value
  * @return string
  */
 protected function formatValue($column, $value)
 {
     switch ($column) {
         case 'filecreatedate':
             return ilDatePresentation::formatDate(new ilDateTime($value, IL_CAL_UNIX));
         case 'filesize':
             return ilFormat::formatSize($value);
         default:
             return $value;
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:16,代码来源:class.ilMailAttachmentTableGUI.php


示例16: fillRow

 /**
  * Fill row template
  * @param array $a_set
  */
 protected function fillRow($a_set)
 {
     global $ilCtrl;
     $this->tpl->setVariable('CHECKBOX_ID', $a_set['user']);
     $this->tpl->setVariable('VAL_USERNAME', $a_set['name']);
     // $ilCtrl->setParameter($this->getParentObject(),'user_id',$a_set['user']);
     // $this->tpl->setVariable('LINK_ITEM', $ilCtrl->getLinkTarget($this->getParentObject(),'showTrackingItem'));
     $this->tpl->setVariable('VAL_LAST', ilDatePresentation::formatDate(new ilDateTime($a_set['last_access'], IL_CAL_UNIX)));
     $this->tpl->setVariable('VAL_ATTEMPT', (int) $a_set['attempts']);
     $this->tpl->setVariable('VAL_VERSION', (string) $a_set['version']);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:15,代码来源:class.ilSCORMTrackingUsersTableGUI.php


示例17: fillRow

 /**
  * Fill row
  *
  * @access public
  * @param
  * 
  */
 public function fillRow($a_set)
 {
     $this->tpl->setVariable('VAL_ID', $a_set['id']);
     $this->tpl->setVariable('VAL_SIZE', sprintf("%.1f KB", $a_set['file_size'] / 1024));
     $this->tpl->setVariable('VAL_DATE', ilDatePresentation::formatDate(new ilDateTime($a_set['date'], IL_CAL_UNIX)));
     foreach ($a_set['record_arr'] as $title) {
         $this->tpl->setCurrentBlock('record_title');
         $this->tpl->setVariable('REC_TITLE', $title);
         $this->tpl->parseCurrentBlock();
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:18,代码来源:class.ilAdvancedMDRecordExportFilesTableGUI.php


示例18: fillRow

 /**
  * Standard Version of Fill Row. Most likely to
  * be overwritten by derived class.
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl, $ilAccess;
     $news_set = new ilSetting("news");
     $enable_internal_rss = $news_set->get("enable_rss_for_internal");
     // user
     if ($a_set["user_id"] > 0) {
         $this->tpl->setCurrentBlock("user_info");
         $user_obj = new ilObjUser($a_set["user_id"]);
         $this->tpl->setVariable("VAL_AUTHOR", $user_obj->getLogin());
         $this->tpl->setVariable("TXT_AUTHOR", $lng->txt("author"));
         $this->tpl->parseCurrentBlock();
     }
     // access
     if ($enable_internal_rss) {
         $this->tpl->setCurrentBlock("access");
         $this->tpl->setVariable("TXT_ACCESS", $lng->txt("news_news_item_visibility"));
         if ($a_set["visibility"] == NEWS_PUBLIC || $a_set["priority"] == 0 && ilBlockSetting::_lookup("news", "public_notifications", 0, $a_set["context_obj_id"])) {
             $this->tpl->setVariable("VAL_ACCESS", $lng->txt("news_visibility_public"));
         } else {
             $this->tpl->setVariable("VAL_ACCESS", $lng->txt("news_visibility_users"));
         }
         $this->tpl->parseCurrentBlock();
     }
     // last update
     if ($a_set["creation_date"] != $a_set["update_date"]) {
         $this->tpl->setCurrentBlock("ni_update");
         $this->tpl->setVariable("TXT_LAST_UPDATE", $lng->txt("last_update"));
         $this->tpl->setVariable("VAL_LAST_UPDATE", ilDatePresentation::formatDate(new ilDateTime($a_set["update_date"], IL_CAL_DATETIME)));
         $this->tpl->parseCurrentBlock();
     }
     // creation date
     $this->tpl->setVariable("VAL_CREATION_DATE", ilDatePresentation::formatDate(new ilDateTime($a_set["creation_date"], IL_CAL_DATETIME)));
     $this->tpl->setVariable("TXT_CREATED", $lng->txt("created"));
     // title
     $this->tpl->setVariable("VAL_TITLE", $a_set["title"]);
     // content
     if ($a_set["content"] != "") {
         $this->tpl->setCurrentBlock("content");
         $this->tpl->setVariable("VAL_CONTENT", ilUtil::shortenText($a_set["content"], 80, true, true), true);
         $this->tpl->parseCurrentBlock();
     }
     $perm_ref_id = $this->perm_ref_id > 0 ? $this->perm_ref_id : $a_set["ref_id"];
     if ($ilAccess->checkAccess("write", "", $perm_ref_id)) {
         $this->tpl->setCurrentBlock("edit");
         $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit"));
         $ilCtrl->setParameterByClass("ilnewsitemgui", "news_item_id", $a_set["id"]);
         $this->tpl->setVariable("CMD_EDIT", $ilCtrl->getLinkTargetByClass("ilnewsitemgui", "editNewsItem"));
         $this->tpl->parseCurrentBlock();
     }
     // context
     $this->tpl->setVariable("CONTEXT", $lng->txt("obj_" . $a_set["context_obj_type"]) . ":<br />" . ilObject::_lookupTitle($a_set["context_obj_id"]));
     $this->tpl->setVariable("VAL_ID", $a_set["id"]);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:58,代码来源:class.ilNewsForContextTableGUI.php


示例19: fillRow

 /**
  * Fill row
  * @staticvar int $counter
  * @param array $set 
  */
 public function fillRow($set)
 {
     global $ilCtrl;
     $ilCtrl->setParameter($this->getParentObject(), 'server_id', $set['server_id']);
     $ilCtrl->setParameterByClass('ilecsmappingsettingsgui', 'server_id', $set['server_id']);
     if ($set['active']) {
         $this->tpl->setVariable('IMAGE_OK', ilUtil::getImagePath('icon_ok.svg'));
         $this->tpl->setVariable('TXT_OK', $this->lng->txt('ecs_activated'));
     } else {
         $this->tpl->setVariable('IMAGE_OK', ilUtil::getImagePath('icon_not_ok.svg'));
         $this->tpl->setVariable('TXT_OK', $this->lng->txt('ecs_inactivated'));
     }
     $this->tpl->setVariable('VAL_TITLE', ilECSSetting::getInstanceByServerId($set['server_id'])->getTitle());
     $this->tpl->setVariable('LINK_EDIT', $ilCtrl->getLinkTarget($this->getParentObject(), 'edit'));
     $this->tpl->setVariable('TXT_SRV_ADDR', $this->lng->txt('ecs_server_addr'));
     if (ilECSSetting::getInstanceByServerId($set['server_id'])->getServer()) {
         $this->tpl->setVariable('VAL_DESC', ilECSSetting::getInstanceByServerId($set['server_id'])->getServer());
     } else {
         $this->tpl->setVariable('VAL_DESC', $this->lng->txt('ecs_not_configured'));
     }
     $dt = ilECSSetting::getInstanceByServerId($set['server_id'])->fetchCertificateExpiration();
     if ($dt != NULL) {
         $this->tpl->setVariable('TXT_CERT_VALID', $this->lng->txt('ecs_cert_valid_until'));
         $now = new ilDateTime(time(), IL_CAL_UNIX);
         $now->increment(IL_CAL_MONTH, 2);
         if (ilDateTime::_before($dt, $now)) {
             $this->tpl->setCurrentBlock('invalid');
             $this->tpl->setVariable('VAL_ICERT', ilDatePresentation::formatDate($dt));
             $this->tpl->parseCurrentBlock();
         } else {
             $this->tpl->setCurrentBlock('valid');
             $this->tpl->setVariable('VAL_VCERT', ilDatePresentation::formatDate($dt));
             $this->tpl->parseCurrentBlock();
         }
     }
     // Actions
     include_once './Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
     $list = new ilAdvancedSelectionListGUI();
     $list->setSelectionHeaderClass('small');
     $list->setItemLinkClass('small');
     $list->setId('actl_' . $set['server_id']);
     $list->setListTitle($this->lng->txt('actions'));
     if (ilECSSetting::getInstanceByServerId($set['server_id'])->isEnabled()) {
         $list->addItem($this->lng->txt('ecs_deactivate'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'deactivate'));
     } else {
         $list->addItem($this->lng->txt('ecs_activate'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'activate'));
     }
     $list->addItem($this->lng->txt('edit'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'edit'));
     $list->addItem($this->lng->txt('copy'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'cp'));
     $list->addItem($this->lng->txt('delete'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'delete'));
     $this->tpl->setVariable('ACTIONS', $list->getHTML());
     $ilCtrl->clearParameters($this->getParentObject());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:58,代码来源:class.ilECSServerTableGUI.php


示例20: availabilityToString

 protected function availabilityToString()
 {
     switch ($this->object->getAvailabilityType()) {
         case ilObjRemoteTest::ACTIVATION_OFFLINE:
             return $this->lng->txt('offline');
         case ilObjRemoteTest::ACTIVATION_UNLIMITED:
             return $this->lng->txt('grp_unlimited');
         case ilObjRemoteTest::ACTIVATION_LIMITED:
             return ilDatePresentation::formatPeriod(new ilDateTime($this->object->getStartingTime(), IL_CAL_UNIX), new ilDateTime($this->object->getEndingTime(), IL_CAL_UNIX));
     }
     return '';
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:12,代码来源:class.ilObjRemoteTestGUI.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ilDateTime类代码示例发布时间:2022-05-23
下一篇:
PHP ilCustomInputGUI类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap