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


PHP ilObjUser::getLastName方法代码示例

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


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

示例1: getHtml

 /**
  * Get HTML
  */
 function getHtml()
 {
     global $tpl, $lng, $https;
     $this->tpl = new ilTemplate("tpl.openlayers_map.html", true, true, "Services/Maps");
     $lng->loadLanguageModule("maps");
     $tpl->addJavaScript("Services/Maps/js/OpenLayers.js");
     $tpl->addJavaScript("Services/Maps/js/ServiceOpenLayers.js");
     // add user markers
     $cnt = 0;
     foreach ($this->user_marker as $user_id) {
         if (ilObject::_exists($user_id)) {
             $user = new ilObjUser($user_id);
             if ($user->getLatitude() != 0 && $user->getLongitude() != 0 && $user->getPref("public_location") == "y") {
                 $this->tpl->setCurrentBlock("user_marker");
                 $this->tpl->setVariable("UMAP_ID", $this->getMapId());
                 $this->tpl->setVariable("CNT", $cnt);
                 $this->tpl->setVariable("ULAT", htmlspecialchars($user->getLatitude()));
                 $this->tpl->setVariable("ULONG", htmlspecialchars($user->getLongitude()));
                 $info = htmlspecialchars($user->getFirstName() . " " . $user->getLastName());
                 $delim = "<br \\/>";
                 if ($user->getPref("public_institution") == "y") {
                     $info .= $delim . htmlspecialchars($user->getInstitution());
                     $delim = ", ";
                 }
                 if ($user->getPref("public_department") == "y") {
                     $info .= $delim . htmlspecialchars($user->getDepartment());
                 }
                 $delim = "<br \\/>";
                 if ($user->getPref("public_street") == "y") {
                     $info .= $delim . htmlspecialchars($user->getStreet());
                 }
                 if ($user->getPref("public_zip") == "y") {
                     $info .= $delim . htmlspecialchars($user->getZipcode());
                     $delim = " ";
                 }
                 if ($user->getPref("public_city") == "y") {
                     $info .= $delim . htmlspecialchars($user->getCity());
                 }
                 $delim = "<br \\/>";
                 if ($user->getPref("public_country") == "y") {
                     $info .= $delim . htmlspecialchars($user->getCountry());
                 }
                 $this->tpl->setVariable("USER_INFO", $info);
                 $this->tpl->setVariable("IMG_USER", $user->getPersonalPicturePath("xsmall"));
                 $this->tpl->parseCurrentBlock();
                 $cnt++;
             }
         }
     }
     $this->tpl->setVariable("MAP_ID", $this->getMapId());
     $this->tpl->setVariable("WIDTH", $this->getWidth());
     $this->tpl->setVariable("HEIGHT", $this->getHeight());
     $this->tpl->setVariable("LAT", $this->getLatitude());
     $this->tpl->setVariable("LONG", $this->getLongitude());
     $this->tpl->setVariable("ZOOM", (int) $this->getZoom());
     $nav_control = $this->getEnableNavigationControl() ? "true" : "false";
     $this->tpl->setVariable("NAV_CONTROL", $nav_control);
     $central_marker = $this->getEnableCentralMarker() ? "true" : "false";
     $this->tpl->setVariable("CENTRAL_MARKER", $central_marker);
     $replace_marker = $this->getEnableUpdateListener() ? "true" : "false";
     $this->tpl->setVariable("REPLACE_MARKER", $replace_marker);
     $this->tpl->setVariable("INVALID_ADDRESS_STRING", $lng->txt("invalid_address"));
     return $this->tpl->get();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:67,代码来源:class.ilOpenLayersMapGUI.php

示例2: deliverVCard

 /**
  * Deliver vcard information.
  */
 function deliverVCard()
 {
     // get user object
     if (!ilObject::_exists($this->getUserId())) {
         return "";
     }
     $user = new ilObjUser($this->getUserId());
     require_once "./Services/User/classes/class.ilvCard.php";
     $vcard = new ilvCard();
     // ilsharedresourceGUI: embedded in shared portfolio
     if ($user->getPref("public_profile") != "y" && $user->getPref("public_profile") != "g" && $_GET["baseClass"] != "ilsharedresourceGUI") {
         return;
     }
     $vcard->setName($user->getLastName(), $user->getFirstName(), "", $user->getUTitle());
     $vcard->setNickname($user->getLogin());
     $webspace_dir = ilUtil::getWebspaceDir("output");
     $imagefile = $webspace_dir . "/usr_images/" . $user->getPref("profile_image");
     if ($user->getPref("public_upload") == "y" && @is_file($imagefile)) {
         $fh = fopen($imagefile, "r");
         if ($fh) {
             $image = fread($fh, filesize($imagefile));
             fclose($fh);
             require_once "./Services/MediaObjects/classes/class.ilObjMediaObject.php";
             $mimetype = ilObjMediaObject::getMimeType($imagefile);
             if (preg_match("/^image/", $mimetype)) {
                 $type = $mimetype;
             }
             $vcard->setPhoto($image, $type);
         }
     }
     $val_arr = array("getInstitution" => "institution", "getDepartment" => "department", "getStreet" => "street", "getZipcode" => "zipcode", "getCity" => "city", "getCountry" => "country", "getPhoneOffice" => "phone_office", "getPhoneHome" => "phone_home", "getPhoneMobile" => "phone_mobile", "getFax" => "fax", "getEmail" => "email", "getHobby" => "hobby", "getMatriculation" => "matriculation", "getClientIP" => "client_ip");
     $org = array();
     $adr = array();
     foreach ($val_arr as $key => $value) {
         // if value "y" show information
         if ($user->getPref("public_" . $value) == "y") {
             switch ($value) {
                 case "institution":
                     $org[0] = $user->{$key}();
                     break;
                 case "department":
                     $org[1] = $user->{$key}();
                     break;
                 case "street":
                     $adr[2] = $user->{$key}();
                     break;
                 case "zipcode":
                     $adr[5] = $user->{$key}();
                     break;
                 case "city":
                     $adr[3] = $user->{$key}();
                     break;
                 case "country":
                     $adr[6] = $user->{$key}();
                     break;
                 case "phone_office":
                     $vcard->setPhone($user->{$key}(), TEL_TYPE_WORK);
                     break;
                 case "phone_home":
                     $vcard->setPhone($user->{$key}(), TEL_TYPE_HOME);
                     break;
                 case "phone_mobile":
                     $vcard->setPhone($user->{$key}(), TEL_TYPE_CELL);
                     break;
                 case "fax":
                     $vcard->setPhone($user->{$key}(), TEL_TYPE_FAX);
                     break;
                 case "email":
                     $vcard->setEmail($user->{$key}());
                     break;
                 case "hobby":
                     $vcard->setNote($user->{$key}());
                     break;
             }
         }
     }
     if (count($org)) {
         $vcard->setOrganization(join(";", $org));
     }
     if (count($adr)) {
         $vcard->setAddress($adr[0], $adr[1], $adr[2], $adr[3], $adr[4], $adr[5], $adr[6]);
     }
     ilUtil::deliverData(utf8_decode($vcard->buildVCard()), $vcard->getFilename(), $vcard->getMimetype());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:87,代码来源:class.ilPublicUserProfileGUI.php

示例3: getHtml

 /**
  * Get HTML
  */
 function getHtml()
 {
     global $tpl;
     $this->tpl = new ilTemplate("tpl.google_map.html", true, true, "Services/GoogleMaps");
     $tpl->addJavaScript("//maps.google.com/maps/api/js?sensor=false", false);
     $tpl->addJavaScript("Services/GoogleMaps/js/ServiceGoogleMaps.js");
     // add user markers
     $cnt = 0;
     foreach ($this->user_marker as $user_id) {
         if (ilObject::_exists($user_id)) {
             $user = new ilObjUser($user_id);
             if ($user->getLatitude() != 0 && $user->getLongitude() != 0 && $user->getPref("public_location") == "y") {
                 $this->tpl->setCurrentBlock("user_marker");
                 $this->tpl->setVariable("UMAP_ID", $this->getMapId());
                 $this->tpl->setVariable("CNT", $cnt);
                 $this->tpl->setVariable("ULAT", htmlspecialchars($user->getLatitude()));
                 $this->tpl->setVariable("ULONG", htmlspecialchars($user->getLongitude()));
                 $info = htmlspecialchars($user->getFirstName() . " " . $user->getLastName());
                 $delim = "<br \\/>";
                 if ($user->getPref("public_institution") == "y") {
                     $info .= $delim . htmlspecialchars($user->getInstitution());
                     $delim = ", ";
                 }
                 if ($user->getPref("public_department") == "y") {
                     $info .= $delim . htmlspecialchars($user->getDepartment());
                 }
                 $delim = "<br \\/>";
                 if ($user->getPref("public_street") == "y") {
                     $info .= $delim . htmlspecialchars($user->getStreet());
                 }
                 if ($user->getPref("public_zip") == "y") {
                     $info .= $delim . htmlspecialchars($user->getZipcode());
                     $delim = " ";
                 }
                 if ($user->getPref("public_city") == "y") {
                     $info .= $delim . htmlspecialchars($user->getCity());
                 }
                 $delim = "<br \\/>";
                 if ($user->getPref("public_country") == "y") {
                     $info .= $delim . htmlspecialchars($user->getCountry());
                 }
                 $this->tpl->setVariable("USER_INFO", $info);
                 $this->tpl->setVariable("IMG_USER", $user->getPersonalPicturePath("xsmall"));
                 $this->tpl->parseCurrentBlock();
                 $cnt++;
             }
         }
     }
     $this->tpl->setVariable("MAP_ID", $this->getMapId());
     $this->tpl->setVariable("WIDTH", $this->getWidth());
     $this->tpl->setVariable("HEIGHT", $this->getHeight());
     $this->tpl->setVariable("LAT", $this->getLatitude());
     $this->tpl->setVariable("LONG", $this->getLongitude());
     $this->tpl->setVariable("ZOOM", (int) $this->getZoom());
     $type_control = $this->getEnableTypeControl() ? "true" : "false";
     $this->tpl->setVariable("TYPE_CONTROL", $type_control);
     $nav_control = $this->getEnableNavigationControl() ? "true" : "false";
     $this->tpl->setVariable("NAV_CONTROL", $nav_control);
     $update_listener = $this->getEnableUpdateListener() ? "true" : "false";
     $this->tpl->setVariable("UPDATE_LISTENER", $update_listener);
     $large_map_control = $this->getEnableLargeMapControl() ? "true" : "false";
     $this->tpl->setVariable("LARGE_CONTROL", $large_map_control);
     $central_marker = $this->getEnableCentralMarker() ? "true" : "false";
     $this->tpl->setVariable("CENTRAL_MARKER", $central_marker);
     return $this->tpl->get();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:69,代码来源:class.ilGoogleMapGUI.php

示例4: publishCreationAC

 /**
  * @param integer $obj_id
  * @param string $title
  * @param string $description
  * @param ilDateTime $start_date
  * @param ilDateTime $end_date
  * @param string $instructions
  * @param string $contact_info
  * @param integer $permanent_room
  * @param string $access_level
  * @param integer $read_contents
  * @param integer $read_records
  * @param integer $folder_id
  * @throws ilException
  */
 public function publishCreationAC($obj_id, $title, $description, $start_date, $end_date, $instructions, $contact_info, $permanent_room, $access_level = self::ACCESS_LEVEL_PROTECTED, $read_contents, $read_records, $folder_id)
 {
     /**
      * @var $ilDB   ilDB
      * */
     global $ilDB;
     $owner_id = ilObject::_lookupOwner($obj_id);
     $ownerObj = new ilObjUser($owner_id);
     // receive breeze session
     $session = $this->xmlApi->getBreezeSession();
     if (!$session) {
         throw new ilException('xavc_connection_error');
     }
     // access check
     if (!$this->xmlApi->login($this->adminLogin, $this->adminPass, $session)) {
         throw new ilException('xavc_authentication_error');
     }
     // receive folder id
     $this->externalLogin = $this->checkExternalUser($ownerObj->getId());
     $folder_id = $this->getFolderIdByLogin($this->externalLogin);
     if (!$folder_id) {
         throw new ilException('xavc_folder_not_available');
     }
     $obj_title_suffix_enabled = ilAdobeConnectServer::getSetting('obj_title_suffix');
     if ($obj_title_suffix_enabled) {
         $title = $title . '_' . CLIENT_ID . '_' . $obj_id;
     }
     // create meeting room
     $arr_meeting = $this->xmlApi->addMeeting($title, $description, date('Y-m-d', $start_date->getUnixTime()), date('H:i', $start_date->getUnixTime()), date('Y-m-d', $end_date->getUnixTime()), date('H:i', $end_date->getUnixTime()), $folder_id, $session);
     $meeting_id = $arr_meeting['meeting_id'];
     $meeting_url = $arr_meeting['meeting_url'];
     if (!$meeting_id) {
         throw new ilException('xavc_meeting_creation_error');
     }
     if (ilAdobeConnectServer::getSetting('user_assignment_mode') != ilAdobeConnectServer::ASSIGN_USER_SWITCH) {
         //Normal Case (not SWITCH aai)
         if ($this->externalLogin == NULL) {
             throw new ilException('xavc_external_login_error');
         } else {
             $this->xmlApi->addUser($this->externalLogin, $ownerObj->getEmail(), $ownerObj->getPasswd(), $ownerObj->getFirstName(), $ownerObj->getLastName(), $session);
         }
         $this->xmlApi->updateMeetingParticipant($meeting_id, $this->externalLogin, $session, 'host');
     } else {
         //In the SWITCH aai case, every user already exists thanks to "cave"
         //Add ILIAS-user himself
         $this->xmlApi->addMeetingHost($meeting_id, $ownerObj->getEmail(), $session);
         //Add technical user
         $this->xmlApi->updateMeetingParticipant($meeting_id, ilAdobeConnectServer::getSetting('login'), $session, 'host');
     }
     $this->xmlApi->updatePermission($meeting_id, $session, $access_level);
     $ilDB->insert('rep_robj_xavc_data', array('id' => array('integer', $obj_id), 'sco_id' => array('integer', $meeting_id), 'start_date' => array('integer', $start_date->getUnixTime()), 'end_date' => array('integer', $end_date->getUnixTime()), 'instructions' => array('text', $instructions), 'contact_info' => array('text', $contact_info), 'permanent_room' => array('integer', (int) $permanent_room), 'perm_read_contents' => array('integer', (int) $this->getReadContents()), 'perm_read_records' => array('integer', (int) $this->getReadRecords()), 'folder_id' => array('integer', $folder_id), 'url_path' => array('text', $meeting_url)));
 }
开发者ID:KamuiXenom,项目名称:ILIAS_AdobeConnectPlugin,代码行数:67,代码来源:class.ilObjAdobeConnect.php

示例5: getTrackingReportHtml

 function getTrackingReportHtml($regId, $showDetails = true, $showTitle = true)
 {
     global $tpl, $ScormCloudService;
     $sr = $ScormCloudService->CreateNewRequest();
     $parameterMap = array('regid' => $regId);
     $parameterMap['resultsformat'] = "full";
     $parameterMap['format'] = "json";
     $parameterMap['jsoncallback'] = "getRegistrationResultCallback";
     $sr->setMethodParams($parameterMap);
     $dataUrl = $sr->ConstructUrl("rustici.registration.getRegistrationResult");
     // Need jquery and the regreport.js
     $tpl->addJavaScript("./Customizing/global/plugins/Services/Repository/RepositoryObject/ScormCloud/tracking/jquery.js");
     //$tpl->addJavaScript("./Customizing/global/plugins/Services/Repository/RepositoryObject/ScormCloud/tracking/jquery-ui.js");
     $tpl->addJavaScript("./Customizing/global/plugins/Services/Repository/RepositoryObject/ScormCloud/tracking/regreport.js");
     $removeMe = strstr($currentUrl, "ilias.php");
     $baseUrl = str_replace($removeMe, "", $currentUrl);
     $stylesheet = $baseUrl . "Customizing/global/plugins/Services/Repository/RepositoryObject/ScormCloud/tracking/regreport.css";
     //$stylesheet = $baseUrl."Customizing/global/plugins/Services/Repository/RepositoryObject/ScormCloud/tracking/css/ui-lightness/jquery-ui-1.7.2.custom.css";
     $stylesheetLink = '<link rel="stylesheet" type="text/css" href="' . $stylesheet . '" />';
     $regParts = split("-", $regId);
     $userObj = new ilObjUser((int) $regParts[1]);
     if ($showTitle) {
         $tableHeader = '<table style="width: 100%" class="fullwidth">' . '<tr class="tbltitle">' . '<th class="std">Course Report for ' . $this->object->getTitle() . '</th>' . '<th align="right" style="text-align: right" class="std">' . $userObj->getFirstName() . ' ' . $userObj->getLastName() . '</th>' . '</tr></table>';
     } else {
         $tableHeader = '';
     }
     // The javascript report will render all activities
     return $stylesheetLink . $tableHeader . '<div showDetails="' . $showDetails . '" dataUrl="' . $dataUrl . '" id="report"/>';
 }
开发者ID:RusticiSoftware,项目名称:SCORMCloud_IliasPlugin,代码行数:29,代码来源:class.ilObjScormCloudGUI.php


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