當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ilLPStatusWrapper::_getNotAttempted方法代碼示例

本文整理匯總了PHP中ilLPStatusWrapper::_getNotAttempted方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilLPStatusWrapper::_getNotAttempted方法的具體用法?PHP ilLPStatusWrapper::_getNotAttempted怎麽用?PHP ilLPStatusWrapper::_getNotAttempted使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ilLPStatusWrapper的用法示例。


在下文中一共展示了ilLPStatusWrapper::_getNotAttempted方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _getInProgress

 function _getInProgress($a_obj_id)
 {
     global $ilDB;
     global $ilBench;
     $ilBench->start('LearningProgress', '9182_LPStatusTestPassed_inProgress');
     include_once './Modules/Test/classes/class.ilObjTestAccess.php';
     $query = "SELECT DISTINCT(user_fi) FROM tst_active " . "WHERE test_fi = '" . ilObjTestAccess::_getTestIDFromObjectID($a_obj_id) . "'";
     $res = $ilDB->query($query);
     while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) {
         $user_ids[] = $row->user_fi;
     }
     $users = array_diff((array) $user_ids, ilLPStatusWrapper::_getCompleted($a_obj_id));
     $users = array_diff((array) $users, ilLPStatusWrapper::_getFailed($a_obj_id));
     $users = array_diff((array) $users, ilLPStatusWrapper::_getNotAttempted($a_obj_id));
     $ilBench->stop('LearningProgress', '9182_LPStatusTestPassed_inProgress');
     return $users ? $users : array();
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:17,代碼來源:class.ilLPStatusTestPassed.php

示例2: _getCountNotAttempted

 /**
  * Static function to read the number of user who have the status 'not_attempted'
  */
 function _getCountNotAttempted($a_obj_id)
 {
     return count(ilLPStatusWrapper::_getNotAttempted($a_obj_id));
 }
開發者ID:Walid-Synakene,項目名稱:ilias,代碼行數:7,代碼來源:class.ilLPStatusWrapper.php

示例3: refreshStatus

 /**
  * Refresh status
  *
  * @param
  * @return
  */
 function refreshStatus($a_obj_id, $a_users = null)
 {
     include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
     $not_attempted = ilLPStatusWrapper::_getNotAttempted($a_obj_id);
     foreach ($not_attempted as $user_id) {
         $percentage = $this->determinePercentage($a_obj_id, $user_id);
         if (self::writeStatus($a_obj_id, $user_id, self::LP_STATUS_NOT_ATTEMPTED_NUM, $percentage, true)) {
             self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_NOT_ATTEMPTED_NUM, $percentage);
         }
     }
     $in_progress = ilLPStatusWrapper::_getInProgress($a_obj_id);
     foreach ($in_progress as $user_id) {
         $percentage = $this->determinePercentage($a_obj_id, $user_id);
         if (self::writeStatus($a_obj_id, $user_id, self::LP_STATUS_IN_PROGRESS_NUM, $percentage, true)) {
             self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_IN_PROGRESS_NUM, $percentage);
         }
     }
     $completed = ilLPStatusWrapper::_getCompleted($a_obj_id);
     foreach ($completed as $user_id) {
         $percentage = $this->determinePercentage($a_obj_id, $user_id);
         if (self::writeStatus($a_obj_id, $user_id, self::LP_STATUS_COMPLETED_NUM, $percentage, true)) {
             self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_COMPLETED_NUM, $percentage);
         }
     }
     $failed = ilLPStatusWrapper::_getFailed($a_obj_id);
     foreach ($failed as $user_id) {
         $percentage = $this->determinePercentage($a_obj_id, $user_id);
         if (self::writeStatus($a_obj_id, $user_id, self::LP_STATUS_FAILED_NUM, $percentage, true)) {
             self::raiseEvent($a_obj_id, $user_id, self::LP_STATUS_FAILED_NUM, $percentage);
         }
     }
     if ($a_users) {
         $missing_users = array_diff($a_users, $not_attempted + $in_progress + $completed + $failed);
         if ($missing_users) {
             foreach ($missing_users as $user_id) {
                 ilLPStatusWrapper::_updateStatus($a_obj_id, $user_id);
             }
         }
     }
 }
開發者ID:JKN-INC,項目名稱:SHELBY-ILIAS,代碼行數:46,代碼來源:class.ilLPStatus.php


注:本文中的ilLPStatusWrapper::_getNotAttempted方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。