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

PHP ilObjUser类代码示例

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

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



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

示例1: __construct

 /**
  * @param $a_parent_obj
  * @param string $a_parent_cmd
  * @param ilObjUser $user The user from whom the certificates are displayed
  * @param array $options
  */
 public function __construct($a_parent_obj, $a_parent_cmd = "", ilObjUser $user, array $options = array())
 {
     $this->_user = $user;
     $options['user_id'] = $user->getId();
     $options['columns'] = isset($options['columns']) ? $options['columns'] : $this->columns;
     parent::__construct($a_parent_obj, $a_parent_cmd, $options);
 }
开发者ID:studer-raimann,项目名称:Certificate,代码行数:13,代码来源:class.srCertificateUserTableGUI.php


示例2: preloadUserObjects

 /**
  * @static
  * @param array $usr_ids
  */
 public static function preloadUserObjects(array $usr_ids)
 {
     /**
      * @var $ilDB ilDB
      */
     global $ilDB;
     $usr_ids_to_request = array_diff($usr_ids, self::$requested_usr_ids);
     self::$requested_usr_ids = array_merge(self::$requested_usr_ids, $usr_ids_to_request);
     self::$requested_usr_ids_key_map = array_flip(self::$requested_usr_ids);
     if ($usr_ids_to_request) {
         $in = $ilDB->in('ud.usr_id', $usr_ids_to_request, false, 'integer');
         $query = "\n\t\t\t\tSELECT ud.usr_id, login, firstname, lastname, title, gender, pprof.value public_profile,pup.value public_upload, pupgen.value public_gender\n\t\t\t\tFROM usr_data ud\n\t\t\t\tLEFT JOIN usr_pref pprof ON pprof.usr_id = ud.usr_id AND pprof.keyword = %s\n\t\t\t\tLEFT JOIN usr_pref pupgen ON pupgen.usr_id = ud.usr_id AND pupgen.keyword = %s\n\t\t\t\tLEFT JOIN usr_pref pup ON pup.usr_id = ud.usr_id AND pup.keyword = %s\n\t\t\t\tWHERE {$in}\n\t\t\t";
         $res = $ilDB->queryF($query, array('text', 'text', 'text'), array('public_profile', 'public_gender', 'public_upload'));
         while ($row = $ilDB->fetchAssoc($res)) {
             $user = new ilObjUser();
             $user->setId($row['usr_id']);
             $user->setLogin($row['login']);
             $user->setGender($row['gender']);
             $user->setTitle($row['title']);
             $user->setFirstname($row['firstname']);
             $user->setLastname($row['lastname']);
             $user->setPref('public_profile', $row['public_profile']);
             $user->setPref('public_upload', $row['public_upload']);
             $user->setPref('public_gender', $row['public_gender']);
             self::$user_instances[$row['usr_id']] = $user;
         }
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:32,代码来源:class.ilMailUserCache.php


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


示例4: checkIfReminderMailShouldBeSend

 public static function checkIfReminderMailShouldBeSend(ilObjUser $user, $reminderTime)
 {
     global $ilDB;
     $query = "SELECT ts FROM " . self::TABLE_NAME . " WHERE usr_id = %s";
     $res = $ilDB->queryF($query, array('integer'), array($user->getId()));
     $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
     if ($row->ts == null) {
         self::sendReminder($user, $reminderTime);
         return true;
     }
     return false;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:12,代码来源:class.ilCronDeleteInactiveUserReminderMail.php


示例5: run

 public function run()
 {
     if (!$this->enabled) {
         return;
     }
     global $rbacreview;
     $usr_ids = ilObjUser::_getUserIdsByInactivationPeriod($this->period);
     foreach ($usr_ids as $usr_id) {
         if ($usr_id == ANONYMOUS_USER_ID || $usr_id == SYSTEM_USER_ID) {
             continue;
         }
         $continue = true;
         foreach ($this->include_roles as $role_id) {
             if ($rbacreview->isAssigned($usr_id, $role_id)) {
                 $continue = false;
                 break;
             }
         }
         if ($continue) {
             continue;
         }
         $user = ilObjectFactory::getInstanceByObjId($usr_id);
         $user->delete();
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:25,代码来源:class.ilCronDeleteInactivatedUserAccounts.php


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


示例7: changeOwner

 function changeOwner()
 {
     global $rbacsystem, $ilObjDataCache;
     if (!($user_id = ilObjUser::_lookupId($_POST['owner']))) {
         ilUtil::sendFailure($this->lng->txt('user_not_known'));
         $this->owner();
         return true;
     }
     // no need to change?
     if ($user_id != $this->gui_obj->object->getOwner()) {
         $this->gui_obj->object->setOwner($user_id);
         $this->gui_obj->object->updateOwner();
         $ilObjDataCache->deleteCachedEntry($this->gui_obj->object->getId());
         include_once "Services/AccessControl/classes/class.ilRbacLog.php";
         if (ilRbacLog::isActive()) {
             ilRbacLog::add(ilRbacLog::CHANGE_OWNER, $this->gui_obj->object->getRefId(), array($user_id));
         }
     }
     ilUtil::sendSuccess($this->lng->txt('owner_updated'), true);
     if (!$rbacsystem->checkAccess("edit_permission", $this->gui_obj->object->getRefId())) {
         $this->ctrl->redirect($this->gui_obj);
         return true;
     }
     $this->ctrl->redirect($this, 'owner');
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.ilPermission2GUI.php


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


示例9: run

 public function run()
 {
     global $rbacreview;
     $status = ilCronJobResult::STATUS_NO_ACTION;
     $usr_ids = ilObjUser::_getUserIdsByInactivityPeriod($this->period);
     $counter = 0;
     foreach ($usr_ids as $usr_id) {
         if ($usr_id == ANONYMOUS_USER_ID || $usr_id == SYSTEM_USER_ID) {
             continue;
         }
         $continue = true;
         foreach ($this->include_roles as $role_id) {
             if ($rbacreview->isAssigned($usr_id, $role_id)) {
                 $continue = false;
                 break;
             }
         }
         if ($continue) {
             continue;
         }
         $user = ilObjectFactory::getInstanceByObjId($usr_id);
         $user->delete();
         $counter++;
     }
     if ($counter) {
         $status = ilCronJobResult::STATUS_OK;
     }
     $result = new ilCronJobResult();
     $result->setStatus($status);
     return $result;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:31,代码来源:class.ilCronDeleteInactiveUserAccounts.php


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


示例11: ilObjectStatusGUI

 /**
  * Constructor
  * @access	public
  */
 function ilObjectStatusGUI(&$a_obj)
 {
     global $ilUser, $ilCtrl, $ilias, $ilErr, $lng, $rbacreview;
     $this->ctrl =& $ilCtrl;
     $this->object =& $a_obj;
     $this->tpl = new ilTemplate("tpl.info_layout.html", false, false, "Services/AccessControl");
     $this->tpl->setVariable("INFO_REMARK_INTERRUPTED", $lng->txt('info_remark_interrupted'));
     if (empty($_POST['Fuserid'])) {
         $this->user =& $ilUser;
     } else {
         if ($_POST['Fselect_type'] == "id") {
             $this->user = $ilias->obj_factory->getInstanceByObjId($_POST['Fuserid'], false);
         } else {
             include_once 'Services/User/classes/class.ilObjUser.php';
             $user_id = ilObjUser::_lookupId($_POST['Fuserid']);
             $this->user = $ilias->obj_factory->getInstanceByObjId($user_id, false);
         }
         if ($this->user === false or $this->user->getType() != 'usr') {
             $this->user =& $ilUser;
             ilUtil::sendFailure($lng->txt('info_err_user_not_exist'));
         } else {
             ilUtil::sendInfo($lng->txt('info_user_view_changed'));
         }
     }
     // get all user roles and all valid roles in scope
     $this->user_roles = $rbacreview->assignedRoles($this->user->getId());
     $this->global_roles = $rbacreview->getGlobalRoles();
     $this->valid_roles = $rbacreview->getParentRoleIds($this->object->getRefId());
     $this->assigned_valid_roles = $this->getAssignedValidRoles();
     $this->getPermissionInfo();
     $this->getRoleAssignmentInfo();
     $this->getObjectSummary();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:37,代码来源:class.ilObjectStatusGUI.php


示例12: send

 public function send()
 {
     switch ($this->getType()) {
         case self::TYPE_NOTIFICATION_ACTIVATION:
             $additional_information = $this->getAdditionalInformation();
             /**
              * @var $user ilObjUser
              */
             $user = $additional_information['usr'];
             foreach ($this->getRecipients() as $rcp) {
                 try {
                     $this->handleCurrentRecipient($rcp);
                 } catch (ilMailException $e) {
                     continue;
                 }
                 $this->initMimeMail();
                 $this->setSubject($this->getLanguage()->txt('reg_mail_subject_confirmation'));
                 $this->setBody($this->getLanguage()->txt('reg_mail_body_salutation') . ' ' . $user->getFullname() . ',');
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguage()->txt('reg_mail_body_confirmation'));
                 $this->appendBody("\n");
                 $this->appendBody(ILIAS_HTTP_PATH . '/confirmReg.php?client_id=' . CLIENT_ID . '&rh=' . ilObjUser::_generateRegistrationHash($user->getId()));
                 $this->appendBody("\n\n");
                 $this->appendBody(sprintf($this->getLanguage()->txt('reg_mail_body_2_confirmation'), ilFormat::_secondsToString($additional_information['hash_lifetime'])));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguage()->txt('reg_mail_body_3_confirmation'));
                 $this->appendBody(ilMail::_getInstallationSignature());
                 $this->sendMimeMail($this->getCurrentRecipient());
             }
             break;
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:32,代码来源:class.ilRegistrationMimeMailNotification.php


示例13: getItems

 /**
  * Get all completed tests
  */
 protected function getItems()
 {
     $data = array();
     foreach (ilExAssignment::getTeamLog($this->team_id) as $item) {
         switch ($item["action"]) {
             case ilExAssignment::TEAM_LOG_CREATE_TEAM:
                 $mess = "create_team";
                 break;
             case ilExAssignment::TEAM_LOG_ADD_MEMBER:
                 $mess = "add_member";
                 break;
             case ilExAssignment::TEAM_LOG_REMOVE_MEMBER:
                 $mess = "remove_member";
                 break;
             case ilExAssignment::TEAM_LOG_ADD_FILE:
                 $mess = "add_file";
                 break;
             case ilExAssignment::TEAM_LOG_REMOVE_FILE:
                 $mess = "remove_file";
                 break;
         }
         $details = $this->lng->txt("exc_team_log_" . $mess);
         if ($item["details"]) {
             $details = sprintf($details, $item["details"]);
         }
         $data[] = array("tstamp" => $item["tstamp"], "user" => ilObjUser::_lookupFullname($item["user_id"]), "details" => $details);
     }
     $this->setData($data);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:32,代码来源:class.ilExAssignmentTeamLogTableGUI.php


示例14: setRowForUser

 protected function setRowForUser(&$set, $user_id)
 {
     $user = new ilObjUser($user_id);
     $set["first_name"] = $user->getFirstname();
     $set["last_name"] = $user->getLastname();
     $set["user_object"] = $user;
     $set["user_id"] = $user_id;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:8,代码来源:class.ilOrgUnitOtherRolesTableGUI.php


示例15: replaceOwnerCallback

 /**
  * Replace owner callback (preg_replace_callback)
  */
 protected function replaceOwnerCallback($matches)
 {
     if (isset($matches[2])) {
         if ($usr_id = ilObjUser::_loginExists($matches[2])) {
             return $matches[1] . $usr_id;
         }
     }
     return $matches[0];
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:12,代码来源:class.ilLuceneQueryParser.php


示例16: trackAcceptance

 /**
  * @param ilObjUser                        $user
  * @param ilTermsOfServiceSignableDocument $document
  */
 public static function trackAcceptance(ilObjUser $user, ilTermsOfServiceSignableDocument $document)
 {
     if (self::isEnabled()) {
         $entity = self::getEntityFactory()->getByName('ilTermsOfServiceAcceptanceEntity');
         $data_gateway = self::getDataGatewayFactory()->getByName('ilTermsOfServiceAcceptanceDatabaseGateway');
         $entity->setUserId($user->getId());
         $entity->setTimestamp(time());
         $entity->setIso2LanguageCode($document->getIso2LanguageCode());
         $entity->setSource($document->getSource());
         $entity->setSourceType($document->getSourceType());
         $entity->setText($document->getContent());
         $entity->setHash(md5($document->getContent()));
         $data_gateway->trackAcceptance($entity);
         $user->writeAccepted();
         // <- Has to be refactored in future releases
         $user->hasToAcceptTermsOfServiceInSession(false);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:22,代码来源:class.ilTermsOfServiceHelper.php


示例17: preload

 public function preload()
 {
     global $objDefinition, $tree, $ilObjDataCache, $ilUser, $rbacsystem;
     if (!$this->obj_ids) {
         return;
     }
     $this->obj_ids = array_unique($this->obj_ids);
     $this->types = array_unique($this->types);
     if ($this->ref_ids) {
         $this->ref_ids = array_unique($this->ref_ids);
     }
     // type specific preloads
     include_once "./Services/AccessControl/classes/class.ilConditionHandler.php";
     foreach ($this->types as $type) {
         $this->obj_ids_by_type[$type] = array_unique($this->obj_ids_by_type[$type]);
         if (is_array($this->ref_ids_by_type[$type])) {
             $this->ref_ids_by_type[$type] = array_unique($this->ref_ids_by_type[$type]);
         }
         if ($this->context == ilObjectListGUI::CONTEXT_REPOSITORY || $this->context == ilObjectListGUI::CONTEXT_PERSONAL_DESKTOP || $this->context == ilObjectListGUI::CONTEXT_SEARCH) {
             ilConditionHandler::preloadConditionsForTargetRecords($type, $this->obj_ids_by_type[$type]);
         }
         $class = $objDefinition->getClassName($type);
         $location = $objDefinition->getLocation($type);
         if ($class && $location) {
             $full_class = "ilObj" . $class . "Access";
             include_once $location . "/class." . $full_class . ".php";
             if (class_exists($full_class)) {
                 call_user_func(array($full_class, "_preloadData"), $this->obj_ids_by_type[$type], $this->ref_ids_by_type[$type]);
             }
         }
     }
     if ($this->ref_ids) {
         $tree->preloadDeleted($this->ref_ids);
         $tree->preloadDepthParent($this->ref_ids);
         $ilObjDataCache->preloadReferenceCache($this->ref_ids, false);
         $rbacsystem->preloadRbacPaCache($this->ref_ids, $ilUser->getId());
         if ($ilUser->getId != ANONYMOUS_USER_ID && $this->context != ilObjectListGUI::CONTEXT_PERSONAL_DESKTOP) {
             ilObjUser::preloadIsDesktopItem($ilUser->getId(), $this->ref_ids);
         }
         include_once "./Services/Object/classes/class.ilObjectActivation.php";
         ilObjectActivation::preloadData($this->ref_ids);
     }
     include_once "./Services/Object/classes/class.ilObjectListGUI.php";
     ilObjectListGUI::preloadCommonProperties($this->obj_ids, $this->context);
     if ($this->context == ilObjectListGUI::CONTEXT_REPOSITORY) {
         include_once "./Services/Rating/classes/class.ilRating.php";
         include_once "./Services/Rating/classes/class.ilRatingGUI.php";
         ilRating::preloadListGUIData($this->obj_ids);
         include_once "./Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php";
         ilAdvancedMDValues::preloadByObjIds($this->obj_ids);
     }
     if ($this->context == ilObjectListGUI::CONTEXT_REPOSITORY || $this->context == ilObjectListGUI::CONTEXT_PERSONAL_DESKTOP || $this->context == ilObjectListGUI::CONTEXT_SEARCH) {
         include_once "./Services/Tracking/classes/class.ilLPStatus.php";
         ilLPStatus::preloadListGUIData($this->obj_ids);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:56,代码来源:class.ilObjectListGUIPreloader.php


示例18: __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


示例19: fillRow

 /**
  * Standard Version of Fill Row. Most likely to
  * be overwritten by derived class.
  */
 protected function fillRow($a_set)
 {
     global $ilCtrl;
     include_once "./Services/User/classes/class.ilObjUser.php";
     $user = ilObjUser::_lookupFields($a_set);
     $ilCtrl->setParameterByClass("ilObjSurveyAdministrationGUI", "item_id", $user["usr_id"]);
     $this->tpl->setVariable("USER_ID", $user["usr_id"]);
     $this->tpl->setVariable("LOGIN", $user["login"]);
     $this->tpl->setVariable("FIRSTNAME", $user["firstname"]);
     $this->tpl->setVariable("LASTNAME", $user["lastname"]);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:15,代码来源:class.ilSpecialUsersTableGUI.php


示例20: initTable

 /**
  * Init table
  */
 protected function initTable()
 {
     global $ilCtrl;
     $this->setFormAction($ilCtrl->getFormAction($this->getParentObject()));
     $this->setRowTemplate('tpl.scorm_track_item.html', 'Modules/ScormAicc');
     $this->setTitle(ilObjUser::_lookupFullname($this->getUserId()));
     $this->addColumn($this->lng->txt('title'), 'title', '35%');
     $this->addColumn($this->lng->txt('cont_status'), 'status', '25%');
     $this->addColumn($this->lng->txt('cont_time'), 'time', '20%');
     $this->addColumn($this->lng->txt('cont_score'), 'score', '20%');
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:14,代码来源:class.ilSCORMTrackingItemsPerUserTableGUI.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP ilObject类代码示例发布时间:2022-05-23
下一篇:
PHP ilObjTest类代码示例发布时间: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