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


PHP ilObjUser::_lookupName方法代码示例

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


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

示例1: 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

示例2: 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

示例3: getParticipantsAndResponsibles

 /**
  * Get participants and responsible users
  */
 function getParticipantsAndResponsibles()
 {
     $participants = array();
     if ($this->app_id > 0) {
         include_once "./Services/Calendar/classes/class.ilCalendarEntry.php";
         $app = new ilCalendarEntry($this->app_id);
         $resp_users = $app->readResponsibleUsers();
         foreach ($resp_users as $v) {
             $n = ilObjUser::_lookupName($v["user_id"]);
             $participants[$v["user_id"]] = array_merge($n, array("type" => "non-member"));
             $this->resp_users[] = $v["user_id"];
         }
     }
     include_once './Modules/Group/classes/class.ilGroupParticipants.php';
     $part = ilGroupParticipants::_getInstanceByObjId($this->grp_id);
     $admins = $part->getAdmins();
     $members = $part->getMembers();
     foreach ($members as $v) {
         $n = ilObjUser::_lookupName($v);
         $participants[$v] = array_merge($n, array("type" => "member"));
     }
     foreach ($admins as $v) {
         $n = ilObjUser::_lookupName($v);
         $participants[$v] = array_merge($n, array("type" => "admin"));
     }
     $this->setData($participants);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:30,代码来源:class.ilMilestoneResponsiblesTableGUI.php

示例4: loginObserver

 /** 
  * Called from fetchData after successful login.
  *
  * @param string username
  */
 public function loginObserver($a_username, $a_auth)
 {
     $GLOBALS['ilLog']->write('Called login observer');
     $name = ilObjUser::_lookupName($this->current_user_id);
     $a_auth->setAuth($name['login']);
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:12,代码来源:class.ilAuthContainerCalendarToken.php

示例5: __construct

 /**
  * Constructor
  */
 function __construct($a_parent_obj, $a_parent_cmd, $a_exc, $a_mem_obj)
 {
     global $ilCtrl, $lng, $ilAccess, $lng;
     $this->exc = $a_exc;
     $this->exc_id = $this->exc->getId();
     include_once "./Modules/Exercise/classes/class.ilExAssignment.php";
     $this->setId("exc_grades_" . $this->exc_id);
     $this->mem_obj = $a_mem_obj;
     $mems = $this->mem_obj->getMembers();
     $data = array();
     foreach ($mems as $d) {
         $data[$d] = ilObjUser::_lookupName($d);
         $data[$d]["user_id"] = $d;
     }
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->setData($data);
     $this->ass_data = ilExAssignment::getAssignmentDataOfExercise($this->exc_id);
     //var_dump($data);
     $this->setTitle($lng->txt("exc_grades"));
     $this->setTopCommands(true);
     //$this->setLimit(9999);
     //		$this->addColumn("", "", "1", true);
     $this->addColumn($this->lng->txt("name"), "lastname");
     $cnt = 1;
     foreach ($this->ass_data as $ass) {
         $ilCtrl->setParameter($this->parent_obj, "ass_id", $ass["id"]);
         $cnt_str = '<a href="' . $ilCtrl->getLinkTarget($this->parent_obj, "members") . '">' . $cnt . '</a>';
         if ($ass["mandatory"]) {
             $this->addColumn("<u>" . $cnt_str . "</u>", "", "", false, "", $ass["title"] . " " . "(" . $lng->txt("exc_mandatory") . ")");
         } else {
             $this->addColumn($cnt_str, "", "", false, "", $ass["title"]);
         }
         $cnt++;
     }
     $ilCtrl->setParameter($this->parent_obj, "ass_id", "");
     $this->addColumn($this->lng->txt("exc_total_exc"), "");
     $this->addColumn($this->lng->txt("exc_comment_for_learner"), "", "1%");
     //		$this->addColumn($this->lng->txt("exc_grading"), "solved_time");
     //		$this->addColumn($this->lng->txt("mail"), "feedback_time");
     $this->setDefaultOrderField("lastname");
     $this->setDefaultOrderDirection("asc");
     $this->setEnableHeader(true);
     $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
     $this->setRowTemplate("tpl.exc_grades_row.html", "Modules/Exercise");
     //$this->disable("footer");
     $this->setEnableTitle(true);
     //		$this->setSelectAllCheckbox("assid");
     // START PATCH RUBRIC CPKN 2015
     include_once 'Services/Object/classes/class.ilObjectLP.php';
     $olp = ilObjectLP::getInstance($this->exc_id);
     $lp_mode = $olp->getCurrentMode();
     if (count($mems) > 0 && $lp_mode != 92) {
         $this->addCommandButton("saveGrades", $lng->txt("exc_save_changes"));
     }
     // END PATCH RUBRIC CPKN 2015
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:59,代码来源:class.ilExGradesTableGUI.php

示例6: __construct

 /**
  * Constructor
  */
 function __construct($a_parent_obj, $a_parent_cmd, $a_exc, $a_part_id)
 {
     global $ilCtrl, $lng, $ilAccess, $lng;
     $this->exc = $a_exc;
     $this->exc_id = $this->exc->getId();
     include_once "./Modules/Exercise/classes/class.ilExAssignment.php";
     $this->part_id = $a_part_id;
     $this->setId("exc_part_" . $this->exc_id . "_" . $this->part_id);
     include_once "./Services/User/classes/class.ilObjUser.php";
     if ($this->part_id > 0) {
         $name = ilObjUser::_lookupName($this->part_id);
         if (trim($name["login"])) {
             $this->user = new ilObjUser($this->part_id);
         } else {
             $ilCtrl->setParameter($a_parent_obj, "part_id", "");
             $ilCtrl->redirect($a_parent_obj, $a_parent_cmd);
         }
     }
     parent::__construct($a_parent_obj, $a_parent_cmd);
     //$this->setData(ilExAssignment::getMemberListData($this->exc_id, $this->ass_id));
     $data = ilExAssignment::getAssignmentDataOfExercise($this->exc_id);
     $this->setData($data);
     //var_dump($data);
     if ($this->part_id > 0) {
         $this->setTitle($lng->txt("exc_participant") . ": " . $name["lastname"] . ", " . $name["firstname"] . " [" . $name["login"] . "]");
     } else {
         $this->setTitle($lng->txt("exc_participant"));
     }
     $this->setTopCommands(true);
     //$this->setLimit(9999);
     //		$this->addColumn("", "", "1", true);
     $this->addColumn($this->lng->txt("exc_assignment"), "order_val");
     $this->addColumn($this->lng->txt("exc_submission"), "submission");
     $this->addColumn($this->lng->txt("exc_grading"), "solved_time");
     //		$this->addColumn($this->lng->txt("mail"), "feedback_time");
     $this->addColumn($this->lng->txt("feedback"), "feedback_time");
     $this->setDefaultOrderField("order_val");
     $this->setDefaultOrderDirection("asc");
     $this->setEnableHeader(true);
     $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
     $this->setRowTemplate("tpl.exc_participant_row.html", "Modules/Exercise");
     //$this->disable("footer");
     $this->setEnableTitle(true);
     //		$this->setSelectAllCheckbox("assid");
     if ($this->part_id > 0) {
         $this->addCommandButton("saveStatusParticipant", $lng->txt("exc_save_changes"));
     }
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     include_once "Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
     $this->overlay_tpl = new ilTemplate("tpl.exc_learner_comment_overlay.html", true, true, "Modules/Exercise");
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:54,代码来源:class.ilExParticipantTableGUI.php

示例7: __construct

 /**
  * Constructor
  */
 function __construct($a_parent_obj, $a_parent_cmd, $a_eph, $a_mem_obj)
 {
     global $ilCtrl, $lng, $ilAccess, $lng;
     $this->eph = $a_eph;
     $this->eph_id = $this->eph->getId();
     include_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus/classes/class.ilEphAssignment.php";
     $this->setId("eph_grades_" . $this->eph_id);
     $this->mem_obj = $a_mem_obj;
     $mems = $this->mem_obj->getMembers();
     $data = array();
     foreach ($mems as $d) {
         $data[$d] = ilObjUser::_lookupName($d);
         $data[$d]["user_id"] = $d;
     }
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->setData($data);
     $this->ass_data = ilEphAssignment::getAssignmentDataOfEphorus($this->eph_id);
     //var_dump($data);
     $this->setTitle($lng->txt("rep_robj_xeph_grades_overview"));
     $this->setTopCommands(true);
     //$this->setLimit(9999);
     //		$this->addColumn("", "", "1", true);
     $this->addColumn($this->lng->txt("name"), "lastname");
     $cnt = 1;
     foreach ($this->ass_data as $ass) {
         $ilCtrl->setParameter($this->parent_obj, "ass_id", $ass["id"]);
         $cnt_str = '<a href="' . $ilCtrl->getLinkTarget($this->parent_obj, "showSubmissions") . '">' . $cnt . '</a>';
         if ($ass["mandatory"]) {
             $this->addColumn("<u>" . $cnt_str . "</u>", "", "", false, "", $ass["title"] . " " . "(" . $lng->txt("rep_robj_xeph_mandatory") . ")");
         } else {
             $this->addColumn($cnt_str, "", "", false, "", $ass["title"]);
         }
         $cnt++;
     }
     $ilCtrl->setParameter($this->parent_obj, "ass_id", "");
     $this->addColumn($this->lng->txt("rep_robj_xeph_total_exc"), "");
     $this->addColumn($this->lng->txt("rep_robj_xeph_comment_for_learner"), "", "1%");
     //		$this->addColumn($this->lng->txt("eph_grading"), "solved_time");
     //		$this->addColumn($this->lng->txt("mail"), "feedback_time");
     $this->setDefaultOrderField("lastname");
     $this->setDefaultOrderDirection("asc");
     $this->setEnableHeader(true);
     $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
     $this->setRowTemplate("tpl.eph_grades_row.html", "Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus");
     //$this->disable("footer");
     $this->setEnableTitle(true);
     //		$this->setSelectAllCheckbox("assid");
     if (count($mems) > 0) {
         $this->addCommandButton("saveGrades", $lng->txt("rep_robj_xeph_save"));
     }
 }
开发者ID:jmcgettrick,项目名称:ilias-ephorus,代码行数:54,代码来源:class.ilEphGradesTableGUI.php

示例8: fillRow

 /**
  * fill row 
  *
  * @access public
  * @param
  * @return
  */
 public function fillRow($data)
 {
     $this->tpl->setVariable("DATE", ilDatePresentation::formatDate(new ilDate($data['tstamp'], IL_CAL_UNIX)));
     $user = ilObjUser::_lookupName($data["user_fi"]);
     $this->tpl->setVariable("USER", ilUtil::prepareFormOutput(trim($user["title"] . " " . $user["firstname"] . " " . $user["lastname"])));
     $title = "";
     if ($data["question_fi"] || $data["original_fi"]) {
         include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
         $title = assQuestion::_getQuestionTitle($data["question_fi"]);
         if (strlen($title) == 0) {
             $title = assQuestion::_getQuestionTitle($data["original_fi"]);
         }
         $title = $this->lng->txt("assessment_log_question") . ": " . $title;
     }
     $this->tpl->setVariable("MESSAGE", ilUtil::prepareFormOutput($data['logtext']) . (strlen($title) ? " (" . $title . ")" : ''));
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:23,代码来源:class.ilAssessmentFolderLogTableGUI.php

示例9: fillRow

 /**
  * Standard Version of Fill Row. Most likely to
  * be overwritten by derived class.
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl, $ilAccess;
     // rollback command
     if ($a_set["nr"] > 0) {
         $ilCtrl->setParameter($this->getParentObject(), "old_nr", $a_set["nr"]);
         $this->tpl->setCurrentBlock("command");
         $this->tpl->setVariable("TXT_COMMAND", $lng->txt("cont_rollback"));
         $this->tpl->setVariable("HREF_COMMAND", $ilCtrl->getLinkTarget($this->getParentObject(), "rollbackConfirmation"));
         $this->tpl->parseCurrentBlock();
         $ilCtrl->setParameter($this->getParentObject(), "old_nr", "");
     }
     if (!$this->rselect) {
         $this->tpl->setVariable("RSELECT", 'checked="checked"');
         $this->rselect = true;
     } else {
         if (!$this->lselect) {
             $this->tpl->setVariable("LSELECT", 'checked="checked"');
             $this->lselect = true;
         }
     }
     $this->tpl->setVariable("NR", $a_set["nr"]);
     $this->tpl->setVariable("TXT_HDATE", ilDatePresentation::formatDate(new ilDateTime($a_set["hdate"], IL_CAL_DATETIME)));
     $ilCtrl->setParameter($this->getParentObject(), "old_nr", $a_set["nr"]);
     $ilCtrl->setParameter($this->getParentObject(), "history_mode", "1");
     $this->tpl->setVariable("HREF_OLD_PAGE", $ilCtrl->getLinkTarget($this->getParentObject(), "preview"));
     $ilCtrl->setParameter($this->getParentObject(), "history_mode", "");
     if (ilObject::_exists($a_set["user"])) {
         // user name
         $user = ilObjUser::_lookupName($a_set["user"]);
         $login = ilObjUser::_lookupLogin($a_set["user"]);
         //$this->tpl->setVariable("TXT_LINKED_USER",
         //	$user["lastname"].", ".$user["firstname"]." [".$login."]");
         // profile link
         include_once "./Services/User/classes/class.ilUserUtil.php";
         $name_pres = ilUserUtil::getNamePresentation($a_set["user"], true, true, $ilCtrl->getLinkTarget($this->getParentObject(), $this->getParentCmd()));
         //$ilCtrl->setParameterByClass("ilpublicuserprofilegui", "user", $a_set["user"]);
         //$ilCtrl->setParameterByClass("ilpublicuserprofilegui", "back_url",
         //	rawurlencode($ilCtrl->getLinkTarget($this->getParentObject(), $this->getParentCmd())));
         //$this->tpl->setVariable("USER_LINK",
         //	$ilCtrl->getLinkTargetByClass("ilpublicuserprofilegui", "getHTML"));
         //$img = ilObjUser::_getPersonalPicturePath($a_set["user"], "xxsmall");
         //$this->tpl->setVariable("IMG_USER", $img);
         $this->tpl->setVariable("TXT_USER", $name_pres);
     }
     $ilCtrl->setParameter($this->getParentObject(), "old_nr", "");
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:51,代码来源:class.ilPageHistoryTableGUI.php

示例10: fillRow

 /**
  * 
  *
  * @access public
  * @param array row data
  * @return
  */
 public function fillRow($a_set)
 {
     $this->tpl->setVariable('VAL_ID', $a_set['cal_id']);
     $this->tpl->setVariable('CALENDAR_NAME', $a_set['name']);
     $this->tpl->setVariable('TXT_FROM', $this->lng->txt('owner'));
     $name = ilObjUser::_lookupName($a_set['owner']);
     $this->tpl->setVariable('LASTNAME', $name['lastname']);
     $this->tpl->setVariable('FIRSTNAME', $name['firstname']);
     $this->tpl->setVariable('APPS_COUNT', $a_set['apps']);
     $this->tpl->setVariable('CREATE_DATE', ilDatePresentation::formatDate(new ilDateTime($a_set['create_date'], IL_CAL_DATETIME)));
     if ($a_set['accepted']) {
         $this->tpl->setVariable('ACC_IMG', ilUtil::getImagePath('icon_ok.svg'));
         $this->tpl->setVariable('ALT_ACC', $this->lng->txt('cal_accepted'));
     }
     if ($a_set['declined']) {
         $this->tpl->setVariable('DEC_IMG', ilUtil::getImagePath('icon_ok.svg'));
         $this->tpl->setVariable('ALT_DEC', $this->lng->txt('cal_declined'));
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.ilCalendarInboxSharedTableGUI.php

示例11: init

 /**
  * Init Table
  */
 public function init()
 {
     $name = ilObjUser::_lookupName($this->getUserId());
     if (strlen($name['firstname']) and strlen($name['lastname'])) {
         $name_string = $name['lastname'] . ', ' . $name['firstname'] . ' [' . $name['login'] . ']';
     } elseif (strlen($name['lastname'])) {
         $name_string = $name['lastname'] . ' [' . $name['login'] . ']';
     } else {
         $name_string = $name['login'];
     }
     $this->setTitle($GLOBALS['lng']->txt('crs_loc_test_results_of') . ' ' . $name_string);
     $this->addColumn($GLOBALS['lng']->txt('crs_objectives'), 'title', '50%');
     if ($this->getSettings()->worksWithInitialTest()) {
         $this->addColumn($GLOBALS['lng']->txt('crs_loc_itest_info'), 'it', '25%');
         $this->addColumn($GLOBALS['lng']->txt('crs_loc_qtest_info'), 'qt', '25%');
     } else {
         $this->addColumn($GLOBALS['lng']->txt('crs_loc_qtest_info'), 'qt', '25%');
     }
     $this->setRowTemplate('tpl.crs_objectives_usr_result_row.html', 'Modules/Course');
     $this->disable('sort');
     $this->disable('num_info');
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:25,代码来源:class.ilLOMemberTestResultTableGUI.php

示例12: __construct

 /**
  * Constructor
  */
 function __construct($a_parent_obj, $a_parent_cmd, $a_eph, $a_part_id)
 {
     global $ilCtrl, $lng, $ilAccess, $lng;
     $this->eph = $a_eph;
     $this->eph_id = $this->eph->getId();
     include_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus/classes/class.ilEphAssignment.php";
     $this->part_id = $a_part_id;
     $this->setId("eph_part_" . $this->eph_id . "_" . $this->part_id);
     include_once "./Services/User/classes/class.ilObjUser.php";
     if ($this->part_id > 0) {
         $name = ilObjUser::_lookupName($this->part_id);
         $this->user = new ilObjUser($this->part_id);
     }
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $data = ilEphAssignment::getAssignmentDataOfEphorus($this->eph_id);
     $this->setData($data);
     if ($this->part_id > 0) {
         $this->setTitle($lng->txt("rep_robj_xeph_participant") . ": " . $name["lastname"] . ", " . $name["firstname"] . " [" . $name["login"] . "]");
     } else {
         $this->setTitle($lng->txt("rep_robj_xeph_participant"));
     }
     $this->setTopCommands(true);
     $this->addColumn($this->lng->txt("rep_robj_xeph_assignment"), "order_val");
     $this->addColumn($this->lng->txt("rep_robj_xeph_submission"), "submission");
     $this->addColumn($this->lng->txt("rep_robj_xeph_reports"), "reports");
     $this->addColumn($this->lng->txt("rep_robj_xeph_grading"), "solved_time");
     $this->addColumn($this->lng->txt("feedback"), "feedback_time");
     $this->setDefaultOrderField("order_val");
     $this->setDefaultOrderDirection("asc");
     $this->setEnableHeader(true);
     $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
     $this->setRowTemplate("tpl.eph_participant_row.html", "Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus");
     $this->setEnableTitle(true);
     if ($this->part_id > 0) {
         $this->addCommandButton("saveStatusParticipant", $lng->txt("rep_robj_xeph_save"));
     }
 }
开发者ID:jmcgettrick,项目名称:ilias-ephorus,代码行数:40,代码来源:class.ilEphParticipantTableGUI.php

示例13: userLookupFullName

 /**
  * Returns the full name of a test user according to the anonymity status
  *
  * @param int $user_id The database ID of the user
  * @param boolean $overwrite_anonymity Indicates if the anonymity status should be ignored
  * @return string The full name of the user or UNKNOWN if the anonymity status is affected
  * @access public
  * 
  * @deprecated: use ilTestParticipantData instead
  */
 function userLookupFullName($user_id, $overwrite_anonymity = FALSE, $sorted_order = FALSE, $suffix = "")
 {
     if ($this->getAnonymity() && !$overwrite_anonymity) {
         return $this->lng->txt("anonymous") . $suffix;
     } else {
         include_once './Services/User/classes/class.ilObjUser.php';
         $uname = ilObjUser::_lookupName($user_id);
         if (strlen($uname["firstname"] . $uname["lastname"]) == 0) {
             $uname["firstname"] = $this->lng->txt("deleted_user");
         }
         if ($sorted_order) {
             return trim($uname["lastname"] . ", " . $uname["firstname"]) . $suffix;
         } else {
             return trim($uname["firstname"] . " " . $uname["lastname"]) . $suffix;
         }
     }
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:27,代码来源:class.ilObjTest.php

示例14: getMemberListData

 /**
  * get member list data
  */
 function getMemberListData($a_eph_id, $a_ass_id)
 {
     global $ilDB;
     $mem = array();
     // first get list of members from member table
     $set = $ilDB->query("SELECT * FROM rep_robj_xeph_members " . "WHERE obj_id = " . $ilDB->quote($a_eph_id, "integer"));
     while ($rec = $ilDB->fetchAssoc($set)) {
         if (ilObject::_exists($rec["user_id"]) && ilObject::_lookupType($rec["user_id"]) == "usr") {
             $name = ilObjUser::_lookupName($rec["user_id"]);
             $login = ilObjUser::_lookupLogin($rec["user_id"]);
             $mem[$rec["user_id"]] = array("name" => $name["lastname"] . ", " . $name["firstname"], "login" => $login, "user_id" => $rec["user_id"], "lastname" => $name["lastname"], "firstname" => $name["firstname"]);
         }
     }
     $q = "SELECT * FROM rep_robj_xeph_ass_stat " . "WHERE ass_id = " . $ilDB->quote($a_ass_id, "integer");
     $set = $ilDB->query($q);
     while ($rec = $ilDB->fetchAssoc($set)) {
         if (isset($mem[$rec["user_id"]])) {
             $mem[$rec["user_id"]]["sent_time"] = $rec["sent_time"];
             $mem[$rec["user_id"]]["submission"] = ilEphAssignment::getLastSubmission($a_ass_id, $rec["user_id"]);
             $mem[$rec["user_id"]]["status_time"] = $rec["status_time"];
             $mem[$rec["user_id"]]["feedback_time"] = $rec["feedback_time"];
             $mem[$rec["user_id"]]["notice"] = $rec["notice"];
             $mem[$rec["user_id"]]["status"] = $rec["status"];
         }
     }
     return $mem;
 }
开发者ID:jmcgettrick,项目名称:ilias-ephorus,代码行数:30,代码来源:class.ilEphAssignment.php

示例15: parse

 /**
  * parse
  *
  * @access public
  * @return
  */
 public function parse()
 {
     $this->shared_obj = new ilCalendarShared($this->calendar_id);
     $items = array();
     foreach ($this->shared_obj->getShared() as $item) {
         switch ($item['obj_type']) {
             case ilCalendarShared::TYPE_USR:
                 $data['type'] = 'usr';
                 $name = ilObjUser::_lookupName($item['obj_id']);
                 $data['title'] = $name['lastname'] . ', ' . $name['firstname'];
                 $data['description'] = '';
                 break;
             case ilCalendarShared::TYPE_ROLE:
                 $data['type'] = 'role';
                 $data['title'] = ilObject::_lookupTitle($item['obj_id']);
                 $data['description'] = ilObject::_lookupDescription($item['obj_id']);
                 break;
         }
         $data['obj_id'] = $item['obj_id'];
         $data['create_date'] = $item['create_date'];
         $data['writable'] = $item['writable'];
         $items[] = $data;
     }
     $this->setData($items ? $items : array());
     return true;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:32,代码来源:class.ilCalendarSharedListTableGUI.php


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