本文整理匯總了PHP中ilCourseParticipants::getPassedUsersForObjects方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilCourseParticipants::getPassedUsersForObjects方法的具體用法?PHP ilCourseParticipants::getPassedUsersForObjects怎麽用?PHP ilCourseParticipants::getPassedUsersForObjects使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ilCourseParticipants
的用法示例。
在下文中一共展示了ilCourseParticipants::getPassedUsersForObjects方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _preloadListData
/**
* Get certificate/passed status for all given objects and users
*
* Used in ilObjCourseAccess for ilObjCourseListGUI
*
* @param array $a_usr_ids
* @param array $a_obj_ids
*/
static function _preloadListData($a_usr_ids, $a_obj_ids)
{
global $ilDB;
if (!is_array($a_usr_ids)) {
$a_usr_ids = array($a_usr_ids);
}
if (!is_array($a_obj_ids)) {
$a_obj_ids = array($a_obj_ids);
}
foreach ($a_usr_ids as $usr_id) {
foreach ($a_obj_ids as $obj_id) {
self::$has_certificate[$usr_id][$obj_id] = false;
}
}
include_once "Services/Certificate/classes/class.ilCertificate.php";
if (ilCertificate::isActive()) {
$obj_active = ilCertificate::areObjectsActive($a_obj_ids);
include_once 'Modules/Course/classes/class.ilCourseParticipants.php';
$data = ilCourseParticipants::getPassedUsersForObjects($a_obj_ids, $a_usr_ids);
foreach ($data as $rec) {
if ($obj_active[$rec["obj_id"]]) {
self::$has_certificate[$rec["usr_id"]][$rec["obj_id"]] = true;
}
}
}
}